| /arkcompiler/ets_runtime/test/aottest/builtin_inlining/global/IsNan/ |
| D | builtinGlobalIsNan.ts | 26 return isNaN(x); 38 //aot: [trace] aot inline builtin: isNan, caller function name:func_main_0@builtinGlobalIsNan 39 print(isNaN(x)) //: true 42 //aot: [trace] aot inline builtin: isNan, caller function name:func_main_0@builtinGlobalIsNan 43 print(isNaN(0)); //: false 44 //aot: [trace] aot inline builtin: isNan, caller function name:func_main_0@builtinGlobalIsNan 45 print(isNaN(3)); //: false 46 //aot: [trace] aot inline builtin: isNan, caller function name:func_main_0@builtinGlobalIsNan 47 print(isNaN(-5)); //: false 50 //aot: [trace] aot inline builtin: isNan, caller function name:func_main_0@builtinGlobalIsNan [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-common-tests/intrinsics/ |
| D | isNaN.ets | 17 if (!Float.isNaN(Float.NaN)) { 20 if (Float.isNaN(Float.POSITIVE_INFINITY)) { 23 if (Float.isNaN(Float.NEGATIVE_INFINITY)) { 26 if (Float.isNaN(Float.MAX_VALUE)) { 29 if (Float.isNaN(Float.MIN_VALUE)) { 32 if (Float.isNaN(1.2345 as float)) { 36 if (!Double.isNaN(Double.NaN)) { 39 if (Double.isNaN(Double.POSITIVE_INFINITY)) { 42 if (Double.isNaN(Double.NEGATIVE_INFINITY)) { 45 if (Double.isNaN(Double.MAX_VALUE)) { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/std/math/ |
| D | BoundariesTest.ets | 32 return Double.isNaN(abs(nan)) 42 && Double.isNaN(sin(nan)) 43 && Double.isNaN(sin(posInf)) 44 && Double.isNaN(sin(negInf)); 50 && Double.isNaN(cos(nan)) 51 && Double.isNaN(cos(posInf)) 52 && Double.isNaN(cos(negInf)); 56 return Double.isNaN(acosh(nan)) 62 return Double.isNaN(acos(nan)) 63 && Double.isNaN(acos(posInf)) [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/checked/ |
| D | ets_isNaN.ets | 50 if (!Double.isNaN(Double.NaN)) return 11; 51 if (Double.isNaN(Double.POSITIVE_INFINITY)) return 12; 52 if (Double.isNaN(Double.NEGATIVE_INFINITY)) return 13; 53 if (Double.isNaN(Double.MAX_VALUE)) return 14; 54 if (Double.isNaN(Double.MIN_VALUE)) return 15; 55 if (Double.isNaN(1.2345)) return 16; 61 if (!Float.isNaN(Float.NaN)) return 1; 62 if (Float.isNaN(Float.POSITIVE_INFINITY)) return 2; 63 if (Float.isNaN(Float.NEGATIVE_INFINITY)) return 3; 64 if (Float.isNaN(Float.MAX_VALUE)) return 4; [all …]
|
| /arkcompiler/ets_runtime/test/moduletest/builtins/ |
| D | builtinsnumber.js | 109 print("builtins number isnan"); 110 print(Number.isNaN()); 111 print(Number.isNaN(undefined)); 112 print(Number.isNaN(null)); 113 print(Number.isNaN(NaN)); 114 print(Number.isNaN(0)); 115 print(Number.isNaN(1)); 116 print(Number.isNaN(-123)); 117 print(Number.isNaN(1.23)); 118 print(Number.isNaN(-1.23e10)); [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/arkts/@arkts/math/Decimal/ |
| D | isFiniteTests.ets | 20 suite.addTest("Decimal isFinite and isNaN with constructor form 1;", testWithConstructorfrom1); 21 …suite.addTest("Decimal isFinite and isNaN with constructor form '-0.1';", testWithConstructorfromS… 22 …suite.addTest("Decimal isFinite and isNaN with constructor form Infinity;", testWithConstructorfro… 23 …suite.addTest("Decimal isFinite and isNaN with constructor form '-Infinity';", testWithConstructor… 24 …suite.addTest("Decimal isFinite and isNaN with constructor form '0.0000000';", testWithConstructor… 25 …suite.addTest("Decimal isFinite and isNaN with constructor form -0;", testWithConstructorfromNegat… 26 …suite.addTest("Decimal isFinite and isNaN with constructor form 'NaN';", testWithConstructorfromSt… 27 …suite.addTest("Decimal isFinite and isNaN with constructor form '-1.234e+2';", testWithConstructor… 28 …suite.addTest("Decimal isFinite and isNaN with constructor form '5e-200';", testWithConstructorfro… 29 …suite.addTest("Decimal isFinite and isNaN with constructor form '1';", testWithConstructorfromStri… [all …]
|
| /arkcompiler/ets_runtime/test/aottest/builtins_number/ |
| D | builtins_number.ts | 32 //isNaN 33 print(Number.isNaN(NaN)); // true 34 print(Number.isNaN(123)); // false 35 print(Number.isNaN("Hello")); // false 36 print(Number.isNaN(undefined)); // false 37 print(Number.isNaN(null)); // false 38 print(Number.isNaN({})); // false
|
| /arkcompiler/ets_frontend/ets2panda/test/ast/compiler/ets/ |
| D | explicit_cast_boxed_expressions.ets | 43 if (byte_float != testFloat || byte_float.isNaN() != testFloat.isNaN()) { 77 if (short_float != testFloat || short_float.isNaN() != testFloat.isNaN()) { 109 if (char_float != testFloat || char_float.isNaN() != testFloat.isNaN()) { 142 if (int_float != testFloat || int_float.isNaN() != testFloat.isNaN()) { 174 if (long_float != testFloat || long_float.isNaN() != testFloat.isNaN()) { 205 …if (float_float != testFloat || float_float.isNaN() != testFloat.isNaN()) { // better to find anot… 236 …if (double_float != testFloat || double_float.isNaN() != testFloat.isNaN()) { // better to find an…
|
| D | implicit_cast_boxed_expressions.ets | 51 if (byte_float != testFloat || byte_float.isNaN() != testFloat.isNaN()) { 92 if (short_float != testFloat || short_float.isNaN() != testFloat.isNaN()) { 133 if (char_float != testFloat || char_float.isNaN() != testFloat.isNaN()) { 178 if (int_float != testFloat || int_float.isNaN() != testFloat.isNaN()) { 217 if (long_float != testFloat || long_float.isNaN() != testFloat.isNaN()) { 256 …if (float_float != testFloat || float_float.isNaN() != testFloat.isNaN()) { // better to find anot… 296 …// if (double_float != testFloat || double_float.isNaN() != testFloat.isNaN()) { // better to find…
|
| /arkcompiler/ets_frontend/ets2panda/test/runtime/ets/ |
| D | explicit_cast_boxed_expressions.ets | 43 if (byte_float != testFloat || byte_float.isNaN() != testFloat.isNaN()) { 77 if (short_float != testFloat || short_float.isNaN() != testFloat.isNaN()) { 109 if (char_float != testFloat || char_float.isNaN() != testFloat.isNaN()) { 142 if (int_float != testFloat || int_float.isNaN() != testFloat.isNaN()) { 174 if (long_float != testFloat || long_float.isNaN() != testFloat.isNaN()) { 205 …if (float_float != testFloat || float_float.isNaN() != testFloat.isNaN()) { // better to find anot… 236 …if (double_float != testFloat || double_float.isNaN() != testFloat.isNaN()) { // better to find an…
|
| D | implicit_cast_boxed_expressions.ets | 51 if (byte_float != testFloat || byte_float.isNaN() != testFloat.isNaN()) { 92 if (short_float != testFloat || short_float.isNaN() != testFloat.isNaN()) { 133 if (char_float != testFloat || char_float.isNaN() != testFloat.isNaN()) { 178 if (int_float != testFloat || int_float.isNaN() != testFloat.isNaN()) { 217 if (long_float != testFloat || long_float.isNaN() != testFloat.isNaN()) { 256 …if (float_float != testFloat || float_float.isNaN() != testFloat.isNaN()) { // better to find anot… 296 …// if (double_float != testFloat || double_float.isNaN() != testFloat.isNaN()) { // better to find…
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/04.casting_contexts_and_conversions/01.numeric_casting_conversions/ |
| D | num_cc_nan.ets | 24 if (!Float.isNaN(d1)) { 30 if (!Double.isNaN(d2)) { 36 if (!Double.isNaN(d3)) { 42 if (!Float.isNaN(d4)) {
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/stdlib-templates/utils/ |
| D | test_check_test_float_result.j2 | 21 if(expected.isNaN()) { 22 if (actual.isNaN()) return 0; 26 if({{.item.result_type|capitalize}}.isNaN(expected)) { 27 if ({{.item.result_type|capitalize}}.isNaN(actual)) return 0;
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/20.unary_expressions/06.unary_minus/ |
| D | unary_minus_outbound_NaN_double.ets | 22 assertEQ(Double.isNaN(a), Double.isNaN(-a))
|
| D | unary_minus_outbound_NaN_float.ets | 22 assertEQ(Float.isNaN(a), Float.isNaN(-a))
|
| /arkcompiler/runtime_core/static_core/plugins/ets/stdlib/std/core/ |
| D | Runtime.ets | 87 if (isNaN(n1val) != isNaN(n2val)) { 89 } else if (isNaN(n1val)) { 104 if (isNaN(f1val) != isNaN(f2val)) { 106 } else if (isNaN(f1val)) {
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.floating-point_types_and_operations/unary_minus/ |
| D | unary_minus_float.ets | 24 if (Float.isNaN(v)) { 25 assertTrue(Float.isNaN(r))
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.floating-point_types_and_operations/unary_plus/ |
| D | unary_plus_float.ets | 24 if (Float.isNaN(v)) { 25 assertTrue(Float.isNaN(r))
|
| /arkcompiler/ets_runtime/ecmascript/builtins/ |
| D | builtins_math.cpp | 59 if (!std::isnan(std::abs(value)) && value <= 1 && value >= -1) { in Acos() 114 if (!std::isnan(std::abs(value))) { in Asinh() 133 if (!std::isnan(std::abs(value))) { in Atan() 181 } else if (!std::isnan(std::abs(valueY)) && !std::isnan(std::abs(valueX))) { in Atan2() 201 if (!std::isnan(std::abs(value))) { in Cbrt() 222 if (!std::isnan(std::abs(value))) { in Ceil() 284 if (!std::isnan(std::abs(value))) { in Cosh() 303 if (!std::isnan(std::abs(value))) { in Exp() 322 if (!std::isnan(std::abs(value))) { in Expm1() 343 if (!std::isnan(std::abs(value))) { in Floor() [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.floating-point_types_and_operations/division/ |
| D | division_float.ets | 26 if (Float.isNaN(v)) { 27 assertTrue(Float.isNaN(r))
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.floating-point_types_and_operations/multiplication/ |
| D | multiplication_float.ets | 26 if (Float.isNaN(v)) { 27 assertTrue(Float.isNaN(r))
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.floating-point_types_and_operations/subtraction/ |
| D | subtraction_float.ets | 26 if (Float.isNaN(v)) { 27 assertTrue(Float.isNaN(r))
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.floating-point_types_and_operations/addition/ |
| D | addition_float.ets | 26 if (Float.isNaN(v)) { 27 assertTrue(Float.isNaN(r))
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/10.compatibility_features/01.extended_conditional_expressions/ |
| D | ops2.ets | 37 assertTrue(Number.isNaN((a && b) as Number)); 44 assertTrue(Number.isNaN((a && b) as Number)); 49 assertTrue(Number.isNaN((a || b) as Number));
|
| /arkcompiler/runtime_core/static_core/plugins/ets/stdlib/escompat/ |
| D | Global.ets | 81 export function isNaN(d: number): boolean { 82 return Double.isNaN(d); 92 export function isNaN(f: Float): boolean { 93 return f.isNaN(); 103 export function isNaN(f: float): boolean { 104 return Float.isNaN(f); 114 export function isNaN(b: byte): boolean { return false; } 123 export function isNaN(i: int): boolean { return false; } 132 export function isNaN(s: short): boolean { return false; } 141 export function isNaN(l: long): boolean { return false; } [all …]
|