40 significand = significand << 1;
41 exponent = exponent - 1;
54 bool lower_boundary_is_closer,
56 bool need_boundary_deltas,
68 Bignum* numerator, Bignum* denominator,
69 Bignum* delta_minus, Bignum* delta_plus);
73 Bignum* delta_minus, Bignum* delta_plus,
77static void BignumToFixed(
int requested_digits,
int* decimal_point,
78 Bignum* numerator, Bignum* denominator,
85 Bignum* numerator, Bignum* denominator,
95 bool lower_boundary_is_closer;
97 float f =
static_cast<float>(v);
107 bool need_boundary_deltas =
110 bool is_even = (significand & 1) == 0;
125 *decimal_point = -requested_digits;
139 estimated_power, need_boundary_deltas,
140 &numerator, &denominator,
141 &delta_minus, &delta_plus);
144 &numerator, &denominator,
145 &delta_minus, &delta_plus);
152 &delta_minus, &delta_plus,
157 &numerator, &denominator,
162 &numerator, &denominator,
192 delta_plus = delta_minus;
201 buffer[(*length)++] =
static_cast<char>(digit +
'0');
208 bool in_delta_room_minus;
209 bool in_delta_room_plus;
213 in_delta_room_minus =
Bignum::Less(*numerator, *delta_minus);
222 if (!in_delta_room_minus && !in_delta_room_plus) {
229 if (delta_minus != delta_plus) {
232 }
else if (in_delta_room_minus && in_delta_room_plus) {
260 }
else if (in_delta_room_minus) {
287 for (
int i = 0;
i <
count - 1; ++
i) {
293 buffer[
i] =
static_cast<char>(digit +
'0');
304 buffer[
count - 1] =
static_cast<char>(digit +
'0');
307 for (
int i =
count - 1;
i > 0; --
i) {
308 if (
buffer[
i] !=
'0' + 10)
break;
312 if (
buffer[0] ==
'0' + 10) {
332 if (-(*decimal_point) > requested_digits) {
338 *decimal_point = -requested_digits;
341 }
else if (-(*decimal_point) == requested_digits) {
362 int needed_digits = (*decimal_point) + requested_digits;
364 numerator, denominator,
407 const double k1Log10 = 0.30102999566398114;
411 double estimate =
ceil((exponent + kSignificandSize - 1) * k1Log10 - 1
e-10);
412 return static_cast<int>(estimate);
418 uint64_t significand,
int exponent,
419 int estimated_power,
bool need_boundary_deltas,
433 if (need_boundary_deltas) {
451 uint64_t significand,
int exponent,
452 int estimated_power,
bool need_boundary_deltas,
467 if (need_boundary_deltas) {
485 uint64_t significand,
int exponent,
486 int estimated_power,
bool need_boundary_deltas,
493 Bignum* power_ten = numerator;
496 if (need_boundary_deltas) {
516 if (need_boundary_deltas) {
570 bool lower_boundary_is_closer,
572 bool need_boundary_deltas,
579 significand, exponent, estimated_power, need_boundary_deltas,
580 numerator, denominator, delta_minus, delta_plus);
581 }
else if (estimated_power >= 0) {
583 significand, exponent, estimated_power, need_boundary_deltas,
584 numerator, denominator, delta_minus, delta_plus);
587 significand, exponent, estimated_power, need_boundary_deltas,
588 numerator, denominator, delta_minus, delta_plus);
591 if (need_boundary_deltas && lower_boundary_is_closer) {
627 *decimal_point = estimated_power + 1;
629 *decimal_point = estimated_power;
static int is_even(int x)
static const int kMaxSignificantBits
void AssignBignum(const Bignum &other)
void ShiftLeft(const int shift_amount)
static bool Equal(const Bignum &a, const Bignum &b)
void AssignUInt64(uint64_t value)
uint16_t DivideModuloIntBignum(const Bignum &other)
static bool LessEqual(const Bignum &a, const Bignum &b)
static bool Less(const Bignum &a, const Bignum &b)
void AssignPowerUInt16(uint16_t base, const int exponent)
void AssignUInt16(const uint16_t value)
void MultiplyByUInt64(const uint64_t factor)
static int PlusCompare(const Bignum &a, const Bignum &b, const Bignum &c)
bool LowerBoundaryIsCloser() const
uint64_t Significand() const
static const uint64_t kHiddenBit
static const int kSignificandSize
uint32_t Significand() const
bool LowerBoundaryIsCloser() const
void BignumDtoa(double v, BignumDtoaMode mode, int requested_digits, Vector< char > buffer, int *length, int *decimal_point)
static void InitialScaledStartValuesNegativeExponentPositivePower(uint64_t significand, int exponent, int estimated_power, bool need_boundary_deltas, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
@ BIGNUM_DTOA_SHORTEST_SINGLE
static int EstimatePower(int exponent)
static void GenerateShortestDigits(Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus, bool is_even, Vector< char > buffer, int *length)
static void BignumToFixed(int requested_digits, int *decimal_point, Bignum *numerator, Bignum *denominator, Vector< char > buffer, int *length)
static void InitialScaledStartValues(uint64_t significand, int exponent, bool lower_boundary_is_closer, int estimated_power, bool need_boundary_deltas, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
static void InitialScaledStartValuesPositiveExponent(uint64_t significand, int exponent, int estimated_power, bool need_boundary_deltas, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
static void FixupMultiply10(int estimated_power, bool is_even, int *decimal_point, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
static int NormalizedExponent(uint64_t significand, int exponent)
static void GenerateCountedDigits(int count, int *decimal_point, Bignum *numerator, Bignum *denominator, Vector< char > buffer, int *length)
static void InitialScaledStartValuesNegativeExponentNegativePower(uint64_t significand, int exponent, int estimated_power, bool need_boundary_deltas, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
SIN Vec< N, float > ceil(const Vec< N, float > &x)
int compare(const void *untyped_lhs, const void *untyped_rhs)
#define DOUBLE_CONVERSION_ASSERT(condition)
#define DOUBLE_CONVERSION_UNREACHABLE()