Skip to content
Commit f92c733c authored by Mark de Wever's avatar Mark de Wever
Browse files

[libc++][format] Fixes floating-point formatting.

Formatting the alternate form for the general categories should keep the
trailing zeros. This was reported by @fsb4000 in D131336.

The default format uses general formatting but this should not keep the
trailing zeros so the default format is not passed to the formatter.

While testing I found an off by one error; finding the exponent character
`e` in 1e+03 will start at after the `1` so a size of `4` can contain an
exponent.

Reviewed By: fsb4000, ldionne, #libc

Differential Revision: https://reviews.llvm.org/D131417
parent d0b9c9c0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment