Custom float printer for consistent default float printing #41
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Currently, we pretty much just throw floats at
format!("{:?}")
and call it a day.Unfortunately, this yields different results depending on Rust version (for example, 1.56 vs 1.60, so not even a big gap!).
So, we need to write our own that will follow a predictable pattern. Then we'll be able to re-enable the underscored tests that deal with floating point numbers that would otherwise fail.
Ideally, this formatter will be pretty smart about formatting exponent form (
1.0e-10
etc), so the numbers also look nice, not just be correct.The text was updated successfully, but these errors were encountered: