Skip to content

Commit

Permalink
Clarify difference in FP representation
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Jan 26, 2025
1 parent 52eeeb5 commit 373855c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -669,5 +669,13 @@ following differences:

- Names are defined in the `fmt` namespace instead of `std` to avoid
collisions with standard library implementations.

- Width calculation doesn't use grapheme clusterization. The latter has
been implemented in a separate branch but hasn't been integrated yet.

- The default floating-point representation in {fmt} uses the smallest
precision that provides round-trip guarantees similarly to other languages
like Java and Python. `std::format` is currently specified in terms of
`std::to_chars` which tries to generate the smallest number of characters
(ignoring redundant digits and sign in exponent) and may procude more
decimal digits than necessary.

0 comments on commit 373855c

Please sign in to comment.