We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
#fmt("%.100f, 1.1) results in 1.1000000000
#fmt("%.100f, 1.1)
1.1000000000
printf's results in 1.10000000000000008881784197001252323389053344726562500... etc.
1.10000000000000008881784197001252323389053344726562500...
The text was updated successfully, but these errors were encountered:
Maybe related to #1375?
Sorry, something went wrong.
I've done some messing around with float formatting here (#2488), and while I haven't found where, yet, there's some kind of 100 character cutoff...
Code:
io::println(#fmt("%.2f", 1.1)); io::println(#fmt("%.50f", 1.1)); io::println(#fmt("%.75f", 1.1)); io::println(#fmt("%.90f", 1.1)); io::println(#fmt("%.99f", 1.1)); io::println(#fmt("%.100f", 1.1));
Output:
1.10 1.10000000000000008881784197001252323389053344726563 1.100000000000000088817841970012523233890533447265625000000000000000000000000 1.100000000000000088817841970012523233890533447265625000000000000000000000000000000000000000 1.100000000000000088817841970012523233890533447265625000000000000000000000000000000000000000000000000 1.1000000000
71bc267
Bump dependencies to fix CI (rust-lang#1610)
64aa626
0d8389c
No branches or pull requests
#fmt("%.100f, 1.1)
results in1.1000000000
printf's results in
1.10000000000000008881784197001252323389053344726562500...
etc.The text was updated successfully, but these errors were encountered: