From 5167a5029df68526b39b80ca8b87b8dff52322a1 Mon Sep 17 00:00:00 2001 From: deadalnix Date: Tue, 10 Jan 2023 21:04:09 +0100 Subject: [PATCH] Change smallest_power_of_ten to -64 for floats. `18446744073709551615e-65` rounds to `0`, and it is the largest possible value with exponent `-65`. Therefore, we can assume the minimal exponent for which we don't round to zero actually is `-64`. --- include/fast_float/float_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index 4a290f4..a96c9cc 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -530,7 +530,7 @@ inline constexpr int binary_format::smallest_power_of_ten() { } template <> inline constexpr int binary_format::smallest_power_of_ten() { - return -65; + return -64; } template <> inline constexpr size_t binary_format::max_digits() {