Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistent output when value rounds to zero #3

Open
snaar opened this issue Mar 25, 2023 · 0 comments
Open

inconsistent output when value rounds to zero #3

snaar opened this issue Mar 25, 2023 · 0 comments

Comments

@snaar
Copy link

snaar commented Mar 25, 2023

These currently pass:

assert_eq!(format!("{:.3}", PrettyPrintFloat(0f64)), "0.0");
assert_eq!(format!("{:.3}", PrettyPrintFloat(0.01f64)), "  0");

But maybe they both should be 0.0? Or at the very least the second one should not be padded to be three characters wide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant