Jonathan Wakely
authored
Calling log10(0.0) returns -inf which has undefined behaviour when converted to an integer. We only need to use log10 for large values anyway. If the value is zero then the larger buffer is only needed due to a large precision, so we don't need to use log10 to estimate the number of digits for the significand. libstdc++-v3/ChangeLog: PR libstdc++/110860 * include/std/format (__formatter_fp::format): Do not call log10 with zero values.
Name | Last commit | Last update |
---|