about summary refs log tree commit diff
path: root/library/core/tests/fmt/float.rs
AgeCommit message (Collapse)AuthorLines
2025-01-26Put all coretests in a separate cratebjorn3-175/+0
2022-10-20Add tests for rounding of ties during float formattingAndrew Tribick-0/+120
2022-10-11Fix inconsistent rounding of 0.5 when formatted to 0 decimal placesAndrew Tribick-2/+2
2021-06-19Automatic exponential formatting in DebugMichael Lamparski-0/+24
* {:.PREC?} already had legitimately useful behavior (recursive formatting of structs using fixed precision for floats) and I suspect that changes to the output there would be unwelcome. (besides, precision introduces sinister edge cases where a number can be rounded up to one of the thresholds) Thus, the new behavior of Debug is, "dynamically switch to exponential, but only if there's no precision." * This could not be implemented in terms of float_to_decimal_common without repeating the branch on precision, so 'float_to_general_debug' is a new function. The name is '_debug' instead of '_common' because the considerations in the previous bullet make this logic pretty specific to Debug. * 'float_to_decimal_common' is now only used by Display, so I inlined the min_precision argument and renamed the function accordingly.
2020-07-27mv std libs to library/mark-0/+31