mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-06 16:56:57 +08:00
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:
parent
6a390f63e9
commit
5167a5029d
@ -530,7 +530,7 @@ inline constexpr int binary_format<double>::smallest_power_of_ten() {
|
||||
}
|
||||
template <>
|
||||
inline constexpr int binary_format<float>::smallest_power_of_ten() {
|
||||
return -65;
|
||||
return -64;
|
||||
}
|
||||
|
||||
template <> inline constexpr size_t binary_format<double>::max_digits() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user