This is a tracking issue for general human-readable floating point formatting akin to C's printf("%g").
RFCs:
| Link |
Description |
| RFC 844 |
Original request for a %g-style format |
| RFC 2729 |
Detailed RFC by @ExpHP proposing a {:g?} Debug formatter following the stabilization of {:x?}. |
Open questions:
- Format specifier and trait (
:g | :g? | :#?). Extend Debug or introduce LowerGen, UpperGen formatting traits?
From RFC 2729:
- The precise format is subject to heavy bikeshedding.
- When should the format be considered final? On stabilization of {:g?}? On stabilization of {:g} if it occurs?
- Public API for this and RFC 2226
Links:
Pre-RFC discussion: https://internals.rust-lang.org/t/pre-rfc-draft-g-or-floating-points-for-humans/9110
Related crates:
This is a tracking issue for general human-readable floating point formatting akin to C's
printf("%g").RFCs:
%g-style format{:g?}Debugformatter following the stabilization of{:x?}.Open questions:
:g | :g? | :#?). ExtendDebugor introduceLowerGen,UpperGenformatting traits?From RFC 2729:
Links:
Pre-RFC discussion: https://internals.rust-lang.org/t/pre-rfc-draft-g-or-floating-points-for-humans/9110
Related crates:
float-pretty-printby @vi3photons-rustby @HadrienG2 implements a%g-like formatter.sad_monte_carloby @droudy implements a%g-like formatter.