-
Notifications
You must be signed in to change notification settings - Fork 57
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
Rounding of floats #48
Comments
That's not rounding, that's 0.3 represented as a float.
|
It's still a bug. |
No it is not. It is literally how floats work. https://en.wikipedia.org/wiki/Floating_point#Accuracy_problems |
Even if that is literally how floats work, let me demonstrate how other JSON processing tools seem not to mind:
It's not that unreasonable to expect that same result from another JSON tool. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Floats are rounded very poorly in
jshon
.E.g.,
echo [0.3] | jshon
outputs:The text was updated successfully, but these errors were encountered: