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`.
This commit is contained in:
deadalnix 2023-01-10 21:04:09 +01:00 committed by Amaury Séchet
parent 6a390f63e9
commit 5167a5029d

View File

@ -530,7 +530,7 @@ inline constexpr int binary_format<double>::smallest_power_of_ten() {
} }
template <> template <>
inline constexpr int binary_format<float>::smallest_power_of_ten() { inline constexpr int binary_format<float>::smallest_power_of_ten() {
return -65; return -64;
} }
template <> inline constexpr size_t binary_format<double>::max_digits() { template <> inline constexpr size_t binary_format<double>::max_digits() {