Fix scientific format docs

This commit is contained in:
Matt Borland
2023-05-09 13:04:08 +02:00
parent c7f56dea0d
commit 63d96fc9cb

View File

@@ -21,8 +21,9 @@ enum class chars_format : unsigned
`boost::charconv::chars_format` is used to specify the format of floating point types with `from_chars` and `to_chars`.
=== Scientific Format
Scientific format will be of the form `+1.3e+3`.
Scientific format will be of the form `1.3e+03`.
The integer part will be between 0 and 9 inclusive. The fraction and exponent will always appear.
The exponent will always have a minimum of 2 digits.
=== Fixed Format
Fixed format will be of the form `2.30` or `3090`. An exponent will not appear with this format. If the precision of `to_chars` exceeds that of the type (e.g. std::numeric_limits<double>::chars10), 0s will be appended to the end.
@@ -31,4 +32,4 @@ Fixed format will be of the form `2.30` or `3090`. An exponent will not appear w
Hex format will be of the form `+1.0e2p+5`. The integer part will always be 0 or 1. The exponent will be with a p instead of an e like in base 10 formats.
=== General
General format will be the shortest representation of a number in either fixed or general format (e.g. `1234` instead of `1.234e+3`.
General format will be the shortest representation of a number in either fixed or general format (e.g. `1234` instead of `1.234e+03`.