-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
float32 values like 0.99 are formatted incorrectly #352
Comments
Here's a playground showing how formatting float32 as float32 gives the correct result, but formatting a float32 as a float64 causes incorrect results: |
prashantv
added a commit
to prashantv/yaml
that referenced
this issue
Mar 28, 2018
Currently, all float values are formatted using 64-bit, but that incorrectly formats float32 values like 0.01 and 0.99. See https://play.golang.org/p/jbseI1ivyMW for more context. Fixes go-yaml#352.
prashantv
changed the title
flaot32 values like 0.99 are formatted incorrectly
float32 values like 0.99 are formatted incorrectly
Mar 28, 2018
This was referenced Mar 28, 2018
niemeyer
pushed a commit
that referenced
this issue
Mar 28, 2018
Currently, all float values are formatted using 64-bit, but that incorrectly formats float32 values like 0.01 and 0.99. See https://play.golang.org/p/jbseI1ivyMW for more context. Fixes #352.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While updating to the latest version, I noticed that float32 values like 0.01 and 0.99 are now formatted incorrectly.
E..g, test failure output for 0.99
I think this is related to #314
I'm working on a fix.
The text was updated successfully, but these errors were encountered: