mirror of
https://github.com/boostorg/charconv.git
synced 2026-02-08 22:52:27 +00:00
Fix scientific format docs
This commit is contained in:
@@ -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`.
|
||||
Reference in New Issue
Block a user