Home
last modified time | relevance | path

Searched full:exponent (Results 1 – 25 of 66) sorted by relevance

123

/arkcompiler/ets_runtime/test/aottest/builtin_inlining/math/Pow/
DbuiltinMathPow.ts35 // If exponent is NaN, return NaN.
40 // If exponent is either +0.0 or -0.0, return 1.0
51 // a. If exponent > +0.0, then
52 // * If exponent is an odd integral Number, return -inf. Otherwise, return +inf.
60 // * If exponent is an odd integral Number, return -0.0. Otherwise, return +0.0.
68 // If base is +0.0 and if exponent > +0.0, return +0.0. Otherwise, return +inf.
78 // a. If exponent > +0.0, then
79 // * If exponent is an odd integral Number, return -0.0. Otherwise, return +0.0.
88 // * If exponent is an odd integral Number, return -inf. Otherwise, return +inf.
96 // If exponent is +inf, then
[all …]
/arkcompiler/ets_frontend/ets2panda/linter/test/main/
Dexponent.ets.arkts2.json84 "rule": "exponent opartions \"**\" and \"**=\" are disabled (arkts-no-exponent-op)",
104 "rule": "exponent opartions \"**\" and \"**=\" are disabled (arkts-no-exponent-op)",
Dexponent.ets.autofix.json150 "rule": "exponent opartions \"**\" and \"**=\" are disabled (arkts-no-exponent-op)",
192 "rule": "exponent opartions \"**\" and \"**=\" are disabled (arkts-no-exponent-op)",
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/04.names_declarations_and_scopes/08.function_declarations/02.parameter_list/
Dspec_example.ets23 function power(base: number, exponent: number): number {
24 return Math.pow(base, exponent)
/arkcompiler/ets_frontend/ets2panda/linter/test/interop/
Dbinary_operation_js_obj.ets.arkts2.json174 "rule": "exponent opartions \"**\" and \"**=\" are disabled (arkts-no-exponent-op)",
244 "rule": "exponent opartions \"**\" and \"**=\" are disabled (arkts-no-exponent-op)",
294 "rule": "exponent opartions \"**\" and \"**=\" are disabled (arkts-no-exponent-op)",
354 "rule": "exponent opartions \"**\" and \"**=\" are disabled (arkts-no-exponent-op)",
Dbinary_operation_js_obj.ets.autofix.json359 "rule": "exponent opartions \"**\" and \"**=\" are disabled (arkts-no-exponent-op)",
506 "rule": "exponent opartions \"**\" and \"**=\" are disabled (arkts-no-exponent-op)",
611 "rule": "exponent opartions \"**\" and \"**=\" are disabled (arkts-no-exponent-op)",
746 "rule": "exponent opartions \"**\" and \"**=\" are disabled (arkts-no-exponent-op)",
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/intrinsics/helpers/
Dets_intrinsics_helpers.h72 uint16_t exponent : coretypes::DOUBLE_EXPONENT_SIZE; member
107 inline double PowHelper(uint64_t number, int16_t exponent, uint8_t radix) in PowHelper() argument
111 double expRem = log2Radix * exponent; in PowHelper()
119 expI = u.bits.exponent + expI; in PowHelper()
128 u.bits.exponent = 0; in PowHelper()
133 u.bits.exponent = expI; in PowHelper()
188 inline double Strtod(const char *str, int exponent, uint8_t radix) in Strtod() argument
212 ++exponent; in Strtod()
216 if (exponent < 0) { in Strtod()
217 result = number / std::pow(radix, -exponent); in Strtod()
[all …]
Dets_intrinsics_helpers.cpp183 int exponent = 0; in StringToDouble() local
197 ++exponent; in StringToDouble()
216 return number * std::pow(radix, exponent); in StringToDouble()
221 …RETURN_IF_CONVERSION_END(++p, end, (digits > 0) ? (number * std::pow(radix, exponent)) : NAN_VALUE… in StringToDouble()
223 --exponent; in StringToDouble()
243 exponent += parseExponentResult.value; in StringToDouble()
261 return Strtod(buffer.c_str(), exponent, radix); in StringToDouble()
443 // exponent in GetBase()
476 // exponent in GetBaseFast()
Ddtoa_helper.h80 …/ DiyFp is a floating-point number type, consists of a uint64 significand and one integer exponent.
/arkcompiler/runtime_core/static_core/plugins/ets/sdk/arkts/
D@arkts.math.Decimal.ets77 internal exponent: number;
107 return this.exponent;
152 return Utils.finalise(new Decimal(this), this.exponent + 1, Decimal.ROUND_FLOOR);
162 return Utils.finalise(new Decimal(this), this.exponent + 1, Decimal.ROUND_CEILING);
171 return Utils.finalise(new Decimal(this), this.exponent + 1, Decimal.ROUND_DOWN);
212 return !!this.digits && Math.floor(this.exponent / LOG_BASE) > this.digits!.length - 2;
612 * Return exponential notation if this Decimal has a positive exponent equal to or greater than
613 * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.
618 …let str = this.finiteToString(this.exponent <= Decimal.toExpNeg || this.exponent >= Decimal.toExpP…
632 result = (len - Math.floor(this.exponent / LOG_BASE)) * LOG_BASE;
[all …]
/arkcompiler/ets_runtime/ecmascript/
Djs_bigint.cpp1074 …le<BigInt> BigInt::Exponentiate(JSThread *thread, JSHandle<BigInt> base, JSHandle<BigInt> exponent) in Exponentiate() argument
1076 if (exponent->GetSign()) { in Exponentiate()
1078 THROW_RANGE_ERROR_AND_RETURN(thread, "Exponent must be positive", bigint); in Exponentiate()
1080 ASSERT(exponent->GetLength() > 0); in Exponentiate()
1081 if (exponent->IsZero()) { in Exponentiate()
1087 uint32_t expValue = exponent->GetDigit(0); in Exponentiate()
1094 if (exponent->GetLength() > 1) { in Exponentiate()
1561 JSHandle<BigInt> exponent = Uint64ToBigInt(thread, bit); in AsUintN() local
1566 JSHandle<BigInt> tValue = Exponentiate(thread, base, exponent); in AsUintN()
1583 JSHandle<BigInt> exponent = Int64ToBigInt(thread, bit - 1); in AsintN() local
[all …]
Djs_tagged_value_internals.h25 // Every double with all of its exponent bits set and its highest mantissa bit set is a quiet NaN.
/arkcompiler/ets_runtime/ecmascript/base/
Dnumber_helper.cpp231 while (Exponent(integer / radix) > 0) { in DoubleToString()
982 int exponent = 0; in StringToDouble() local
996 ++exponent; in StringToDouble()
1015 return number * std::pow(radix, exponent); in StringToDouble()
1019 exponent = 0; in StringToDouble()
1022 (number * std::pow(radix, exponent)) : NAN_VALUE); in StringToDouble()
1024 --exponent; in StringToDouble()
1044 // 10. parse exponent number in StringToDouble()
1061 exponent += (exponentSign == '-' ? -additionalExponent : additionalExponent); in StringToDouble()
1078 return Strtod(buffer.c_str(), exponent, radix); in StringToDouble()
[all …]
Dnumber_helper.h87 // Exponent bits for double value between [1.0, 2.0)
143 static int inline Exponent(double x) in GetNaN() function
236 static double Strtod(const char *str, int exponent, uint8_t radix);
Ddtoa_helper.h168 …/ DiyFp is a floating-point number type, consists of a uint64 significand and one integer exponent.
291 …static void FillFractionals(uint64_t fractionals, int exponent, int fractional_count, BufferVector…
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/arkts/@arkts/math/Decimal/
DconstructorTests.ets18 function t(digits: number[], exponent: number, sign: number, n: number | string) {
25 assertEQ(exponent, v.e, `Decimal(${n}).e, actual:${v.e} is not equal to ${exponent}`);
/arkcompiler/ets_frontend/ets2panda/lexer/token/
Dnumber.cpp25 …if ((flags & (NumberFlags::DECIMAL_POINT | NumberFlags::EXPONENT)) == std::underlying_type_t<Token… in Number()
Dnumber.h31 EXPONENT = 1U << 2U, enumerator
/arkcompiler/ets_frontend/ets2panda/linter/src/lib/utils/consts/
DArkTS2Rules.ts179 [203, 'arkts-no-exponent-op'],
/arkcompiler/runtime_core/bytecode_optimizer/
Dtagged_value.h27 // Every double with all of its exponent bits set and its highest mantissa bit set is a quiet NaN.
/arkcompiler/ets_frontend/ets2panda/linter/src/lib/
DFaultDesc.ts140 faultDesc[FaultID.MathPow] = 'Exponent call';
143 faultDesc[FaultID.ExponentOp] = 'Exponent operation';
/arkcompiler/ets_frontend/es2panda/util/
Dhelpers.cpp171 int32_t exponent = atoi(sciNotationArray + significandBitCount + 1 + (significandBitCount > 1)); in GetScientificNotationForDouble() local
172 numberBitCount = exponent + 1; in GetScientificNotationForDouble()
218 …fic notation, number is expressed in the form of significand multiplied by exponent-th power of 10. in DoubleToString()
220 // Scientific notation of number: sciNotationArray = significand * (10 ** exponent) in DoubleToString()
221 // number 1.23e25 => sciNotationArray: 1.23e+25, significand: 1.23, exponent: 25, in DoubleToString()
/arkcompiler/runtime_core/static_core/compiler/tests/
Dencoder_test_common.h68 // Max and min exponent on the basus of two float and double
/arkcompiler/ets_frontend/ets2panda/util/
Ddtoa_helper.h92 …/ DiyFp is a floating-point number type, consists of a uint64 significand and one integer exponent.
/arkcompiler/ets_frontend/ets2panda/ir/expressions/literals/
DnumberLiteral.cpp125 // Parse the digits of the exponent in ParseExponent()
153 // exponent in GetBase()

123