Home
last modified time | relevance | path

Searched refs:digit (Results 1 - 14 of 14) sorted by relevance

/arkcompiler/ets_runtime/ecmascript/base/tests/
H A Dnumber_helper_test.cpp733 int digit = 2; in HWTEST_F_L0() local
736 0.10000000000000001, digit, flags)); in HWTEST_F_L0()
739 digit = 3; in HWTEST_F_L0()
742 0.10000000000000001, digit, flags)); in HWTEST_F_L0()
745 digit = 2; in HWTEST_F_L0()
748 0.01, digit, flags)); in HWTEST_F_L0()
751 digit = 3; in HWTEST_F_L0()
754 0.01, digit, flags)); in HWTEST_F_L0()
757 digit = 7; in HWTEST_F_L0()
760 5.9999999999999997e-07, digit, flag in HWTEST_F_L0()
798 int digit = 2; HWTEST_F_L0() local
[all...]
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/intrinsics/helpers/
H A Dets_intrinsics_helpers.cpp64 uint8_t digit; in ParseExponent() local
65 while ((digit = ToDigit(*p)) < radix) { in ParseExponent()
69 additionalExponent = additionalExponent * static_cast<int32_t>(radix) + static_cast<int32_t>(digit); in ParseExponent()
343 EtsString *DoubleToExponential(double number, int digit) in DoubleToExponential() argument
346 if (digit < 0) { in DoubleToExponential()
349 ss << std::setiosflags(std::ios::scientific) << std::setprecision(digit) << number; in DoubleToExponential()
356 if (digit < 0) { in DoubleToExponential()
373 EtsString *DoubleToFixed(double number, int digit) in DoubleToFixed() argument
376 ss << std::setiosflags(std::ios::fixed) << std::setprecision(digit) << number; in DoubleToFixed()
380 EtsString *DoubleToPrecision(double number, int digit) in DoubleToPrecision() argument
563 auto digit = s % TEN; SmallFpToString() local
[all...]
H A Dets_intrinsics_helpers.h205 uint8_t digit = ToDigit(static_cast<uint8_t>(*p)); in Strtod() local
206 if (digit >= radix) { in Strtod()
210 number = number * radix + digit; in Strtod()
229 int digit = static_cast<int>((current > '9') ? (current - 'a' + DECIMAL) : (current - '0')); in Carry() local
230 digit = (digit == (radix - 1)) ? 0 : digit + 1; in Carry()
231 return CHARS[digit]; in Carry()
306 EtsString *DoubleToExponential(double number, int digit);
307 EtsString *DoubleToFixed(double number, int digit);
[all...]
/arkcompiler/ets_runtime/ecmascript/base/
H A Dnumber_helper.cpp160 uint32_t digit = 0; variable
162 digit = n % radix;
164 buf[index] = ToCharCode(digit) + 0X00;
199 int64_t digit = std::floor(fraction);
200 fraction -= digit;
201 buffer[fractionCursor++] = CHARS[digit];
422 JSTaggedValue NumberHelper::DoubleToPrecisionString(JSThread *thread, double number, int digit)
425 return DoubleToFixedString(thread, number, digit - 1);
429 int radixDigit = digit - logDigit - 1;
431 if ((logDigit >= MIN_EXPONENT_DIGIT && logDigit < digit)) {
[all...]
H A Ddtoa_helper.cpp78 return 1; // 1: means the decimal digit in CountDecimalDigit32()
80 return 2; // 2: means the decimal digit in CountDecimalDigit32()
82 return 3; // 3: means the decimal digit in CountDecimalDigit32()
84 return 4; // 4: means the decimal digit in CountDecimalDigit32()
86 return 5; // 5: means the decimal digit in CountDecimalDigit32()
88 return 6; // 6: means the decimal digit in CountDecimalDigit32()
90 return 7; // 7: means the decimal digit in CountDecimalDigit32()
92 return 8; // 8: means the decimal digit in CountDecimalDigit32()
94 return 9; // 9: means the decimal digit in CountDecimalDigit32()
110 case 9: // 9: means the decimal digit in DigitGen()
226 int digit = static_cast<int>(number % TEN); FillDigits32() local
314 int digit = static_cast<int>(fractionals >> point); FillFractionals() local
[all...]
/arkcompiler/ets_frontend/ets2panda/lexer/regexp/
H A Dregexp.cpp595 char32_t digit = Next(); in ParseHexEscape() local
596 if (!IsHexDigit(digit)) { in ParseHexEscape()
601 uint32_t cpValue = HexValue(digit) * MULTIPLIER; in ParseHexEscape()
603 digit = Next(); in ParseHexEscape()
604 if (!IsHexDigit(digit)) { in ParseHexEscape()
608 cpValue += HexValue(digit); in ParseHexEscape()
618 char32_t digit = Next(); in ParseUnicodeDigits() local
619 if (!IsHexDigit(digit)) { in ParseUnicodeDigits()
624 value = value * MULTIPLIER + HexValue(digit); in ParseUnicodeDigits()
/arkcompiler/ets_frontend/es2panda/lexer/regexp/
H A Dregexp.cpp593 char32_t digit = Next(); in ParseHexEscape() local
594 if (!IsHexDigit(digit)) { in ParseHexEscape()
599 uint32_t cpValue = HexValue(digit) * MULTIPLIER; in ParseHexEscape()
601 digit = Next(); in ParseHexEscape()
602 if (!IsHexDigit(digit)) { in ParseHexEscape()
606 cpValue += HexValue(digit); in ParseHexEscape()
616 char32_t digit = Next(); in ParseUnicodeDigits() local
617 if (!IsHexDigit(digit)) { in ParseUnicodeDigits()
622 value = value * MULTIPLIER + HexValue(digit); in ParseUnicodeDigits()
/arkcompiler/ets_runtime/ecmascript/builtins/
H A Dbuiltins_number.cpp271 double digit = digitInt.GetNumber(); in ToFixed() local
272 if (digit < base::MIN_FRACTION || digit > base::MAX_FRACTION) { in ToFixed()
294 return NumberHelper::DoubleToFixedString(thread, valueNumber, static_cast<int>(digit)); in ToFixed()
398 double digit = digitInt.GetNumber(); in ToPrecision() local
399 if (digit < base::MIN_FRACTION + 1 || digit > base::MAX_FRACTION) { in ToPrecision()
402 return NumberHelper::DoubleToPrecisionString(thread, valueNumber, static_cast<int>(digit)); in ToPrecision()
/arkcompiler/ets_runtime/ecmascript/extractortool/src/
H A Dsource_map.cpp314 uint32_t digit = Base64CharToInt(vStr[i]); in VlqRevCode() local
315 if (digit == DIGIT_NUM) { in VlqRevCode()
318 continuation = digit & VLQ_CONTINUATION_BIT; in VlqRevCode()
319 digit &= VLQ_BASE_MASK; in VlqRevCode()
320 result += digit << shift; in VlqRevCode()
/arkcompiler/ets_runtime/ecmascript/compiler/builtins/
H A Dbuiltins_number_stub_builder.cpp438 DEFVARIABLE(digit, VariableType::INT32(), Int32(0)); in NumberToString()
451 digit = Int32Mod(*n, radix); in NumberToString()
453 GateRef digitChar = ToCharCode(*digit); in NumberToString()
/arkcompiler/ets_frontend/ets2panda/lexer/
H A Dlexer.h534 ThrowError("Invalid digit"); in ScanNumberRadix()
542 auto digit = HexValue(cp); in ScanNumberRadix() local
548 number = number * RADIX + digit; in ScanNumberRadix()
/arkcompiler/ets_runtime/ecmascript/
H A Djs_bigint.h154 inline void SetDigit(uint32_t index, uint32_t digit)
157 Barriers::SetPrimitive<uint32_t>(GetData(), sizeof(uint32_t) * index, digit);
H A Djs_bigint.cpp1633 uint32_t digit = 0; in BigIntToNumber() local
1635 digit = bigint->GetDigit(--index); in BigIntToNumber()
1641 mantissa |= (static_cast<uint64_t>(digit) << (remainMantissaBits - BigInt::DATEBITS)); in BigIntToNumber()
1646 digit = bigint->GetDigit(index); in BigIntToNumber()
1647 mantissa |= (static_cast<uint64_t>(digit) >> (BigInt::DATEBITS - remainMantissaBits)); in BigIntToNumber()
1651 // The remaining bits of the current digit in BigIntToNumber()
1662 digit = bigint->GetDigit(index--); in BigIntToNumber()
1666 if (!(digit & temp)) { in BigIntToNumber()
1669 if ((digit & (temp - 1)) != 0) { in BigIntToNumber()
/arkcompiler/ets_runtime/ecmascript/tests/
H A Djs_bigint_test.cpp136 uint32_t digit = maxSafeIntPlusOne->GetDigit(i); in HWTEST_F_L0() local
137 if (digit == 0) { in HWTEST_F_L0()
145 uint32_t digit = maxSafeIntPlusOne->GetDigit(i); in HWTEST_F_L0() local
146 EXPECT_EQ(digit, 0U); in HWTEST_F_L0()
755 EXPECT_TRUE(addres3->GetDigit(0) == 2); // 2 : digit value in HWTEST_F_L0()

Completed in 15 milliseconds