We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10642e6 commit 7dbe3dcCopy full SHA for 7dbe3dc
include/fmt/format-inl.h
@@ -327,7 +327,8 @@ FMT_CONSTEXPR inline fp operator*(fp x, fp y) {
327
FMT_CONSTEXPR inline fp get_cached_power(int min_exponent,
328
int& pow10_exponent) {
329
const int shift = 32;
330
- const auto significand = static_cast<int64_t>(log10_2_significand);
+ // log10(2) = 0x0.4d104d427de7fbcc...
331
+ const auto significand = static_cast<int64_t>(0x4d104d427de7fbcc);
332
int index = static_cast<int>(
333
((min_exponent + fp::num_significand_bits - 1) * (significand >> shift) +
334
((int64_t(1) << shift) - 1)) // ceil
0 commit comments