63 uint64_t distance_too_high_w,
64 uint64_t unsafe_interval,
68 uint64_t small_distance = distance_too_high_w - unit;
69 uint64_t big_distance = distance_too_high_w + unit;
142 while (rest < small_distance &&
143 unsafe_interval - rest >= ten_kappa &&
144 (rest + ten_kappa < small_distance ||
145 small_distance - rest >= rest + ten_kappa - small_distance)) {
153 if (rest < big_distance &&
154 unsafe_interval - rest >= ten_kappa &&
155 (rest + ten_kappa < big_distance ||
156 big_distance - rest > rest + ten_kappa - big_distance)) {
165 return (2 * unit <= rest) && (rest <= unsafe_interval - 4 * unit);
194 if (unit >= ten_kappa)
return false;
198 if (ten_kappa - unit <= unit)
return false;
200 if ((ten_kappa - rest > rest) && (ten_kappa - 2 * rest >= 2 * unit)) {
204 if ((rest > unit) && (ten_kappa - (rest - unit) <= (rest - unit))) {
208 if (
buffer[
i] !=
'0' + 10)
break;
216 if (
buffer[0] ==
'0' + 10) {
237 {0, 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000,
243 int* exponent_plus_one) {
246 int exponent_plus_one_guess = ((number_bits + 1) * 1233 >> 12);
249 exponent_plus_one_guess++;
252 exponent_plus_one_guess--;
255 *exponent_plus_one = exponent_plus_one_guess;
321 DiyFp too_low =
DiyFp(low.f() - unit, low.e());
322 DiyFp too_high =
DiyFp(high.f() + unit, high.e());
333 DiyFp one =
DiyFp(
static_cast<uint64_t
>(1) << -
w.e(),
w.e());
335 uint32_t integrals =
static_cast<uint32_t
>(too_high.
f() >> -one.
e());
337 uint64_t fractionals = too_high.
f() & (one.
f() - 1);
339 int divisor_exponent_plus_one;
341 &divisor, &divisor_exponent_plus_one);
342 *kappa = divisor_exponent_plus_one;
349 int digit = integrals / divisor;
353 integrals %= divisor;
358 (
static_cast<uint64_t
>(integrals) << -one.
e()) + fractionals;
361 if (rest < unsafe_interval.
f()) {
365 unsafe_interval.
f(), rest,
366 static_cast<uint64_t
>(divisor) << -one.
e(), unit);
383 unsafe_interval.
set_f(unsafe_interval.
f() * 10);
385 int digit =
static_cast<int>(fractionals >> -one.
e());
389 fractionals &= one.
f() - 1;
391 if (fractionals < unsafe_interval.
f()) {
393 unsafe_interval.
f(), fractionals, one.
f(), unit);
429 int requested_digits,
438 uint64_t w_error = 1;
443 DiyFp one =
DiyFp(
static_cast<uint64_t
>(1) << -
w.e(),
w.e());
445 uint32_t integrals =
static_cast<uint32_t
>(
w.f() >> -one.
e());
447 uint64_t fractionals =
w.f() & (one.
f() - 1);
449 int divisor_exponent_plus_one;
451 &divisor, &divisor_exponent_plus_one);
452 *kappa = divisor_exponent_plus_one;
460 int digit = integrals / divisor;
465 integrals %= divisor;
469 if (requested_digits == 0)
break;
473 if (requested_digits == 0) {
475 (
static_cast<uint64_t
>(integrals) << -one.
e()) + fractionals;
477 static_cast<uint64_t
>(divisor) << -one.
e(), w_error,
490 while (requested_digits > 0 && fractionals > w_error) {
494 int digit =
static_cast<int>(fractionals >> -one.
e());
499 fractionals &= one.
f() - 1;
502 if (requested_digits != 0)
return false;
523 int* decimal_exponent) {
529 DiyFp boundary_minus, boundary_plus;
534 float single_v =
static_cast<float>(v);
540 int ten_mk_minimal_binary_exponent =
542 int ten_mk_maximal_binary_exponent =
545 ten_mk_minimal_binary_exponent,
546 ten_mk_maximal_binary_exponent,
579 bool result =
DigitGen(scaled_boundary_minus, scaled_w, scaled_boundary_plus,
581 *decimal_exponent = -mk + kappa;
592 int requested_digits,
595 int* decimal_exponent) {
599 int ten_mk_minimal_binary_exponent =
601 int ten_mk_maximal_binary_exponent =
604 ten_mk_minimal_binary_exponent,
605 ten_mk_maximal_binary_exponent,
630 *decimal_exponent = -mk + kappa;
637 int requested_digits,
640 int* decimal_point) {
645 int decimal_exponent = 0;
659 *decimal_point = *
length + decimal_exponent;
static DiyFp Minus(const DiyFp &a, const DiyFp &b)
void set_f(uint64_t new_value)
static const int kSignificandSize
static DiyFp Times(const DiyFp &a, const DiyFp &b)
void NormalizedBoundaries(DiyFp *out_m_minus, DiyFp *out_m_plus) const
DiyFp AsNormalizedDiyFp() const
void NormalizedBoundaries(DiyFp *out_m_minus, DiyFp *out_m_plus) const
void GetCachedPowerForBinaryExponentRange(int min_exponent, int max_exponent, DiyFp *power, int *decimal_exponent)
static bool Grisu3Counted(double v, int requested_digits, Vector< char > buffer, int *length, int *decimal_exponent)
static bool DigitGen(DiyFp low, DiyFp w, DiyFp high, Vector< char > buffer, int *length, int *kappa)
static bool RoundWeedCounted(Vector< char > buffer, int length, uint64_t rest, uint64_t ten_kappa, uint64_t unit, int *kappa)
static const int kMinimalTargetExponent
@ FAST_DTOA_SHORTEST_SINGLE
static bool RoundWeed(Vector< char > buffer, int length, uint64_t distance_too_high_w, uint64_t unsafe_interval, uint64_t rest, uint64_t ten_kappa, uint64_t unit)
static void BiggestPowerTen(uint32_t number, int number_bits, uint32_t *power, int *exponent_plus_one)
bool FastDtoa(double v, FastDtoaMode mode, int requested_digits, Vector< char > buffer, int *length, int *decimal_point)
static bool Grisu3(double v, FastDtoaMode mode, Vector< char > buffer, int *length, int *decimal_exponent)
static const int kMaximalTargetExponent
static bool DigitGenCounted(DiyFp w, int requested_digits, Vector< char > buffer, int *length, int *kappa)
static unsigned int const kSmallPowersOfTen[]
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
#define DOUBLE_CONVERSION_ASSERT(condition)
#define DOUBLE_CONVERSION_UINT64_2PART_C(a, b)
#define DOUBLE_CONVERSION_UNREACHABLE()