Floating point rounding doesn't propagate past the decimal point
Opened this issue · 0 comments
jordanmchavez commented
nanofmt::format_to_n(buf, size, "{:.2f}", 0.9999);
produces "0.99" instead of "1.00". The problem is in charconv: the calls to to_chars_n_round
don't consider if we've rounded the last digit to zero.