You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rust 1.58 changed how floats output with {:?} are displayed. When they are larger or smaller than a specific threshold, then the output switches to scientific notation. This makes the assert_float_eq! output less helpful, as the non-scientific notation is much clearer for comparing values side by side:
Unfortunately, there appears to be no way to disable this behaviour with a format specifier. It is plausible that a solution may involve wrapping numeric outputs from float_eq's traits to print in this format. This is a significant amount of work.
The text was updated successfully, but these errors were encountered:
Rust 1.58 changed how floats output with
{:?}
are displayed. When they are larger or smaller than a specific threshold, then the output switches to scientific notation. This makes theassert_float_eq!
output less helpful, as the non-scientific notation is much clearer for comparing values side by side:Compare with:
Unfortunately, there appears to be no way to disable this behaviour with a format specifier. It is plausible that a solution may involve wrapping numeric outputs from float_eq's traits to print in this format. This is a significant amount of work.
The text was updated successfully, but these errors were encountered: