-
Notifications
You must be signed in to change notification settings - Fork 128
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
Fixed serialization for floating point values less than EPSILON. #372
Conversation
I found why the tests are failing in an unrelated way - for some reason |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you file a short issue for this bug and then link that in a CHANGELOG entry? Otherwise, this looks good to me - thanks for catching the issue!
Thanks for opening the issue @KirbyER! Could you rebase your branch and add the following line (or a better description) to the bottom of the unreleased section of the CHANGELOG:
Thanks again for catching this bug and finding a fix! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense!
Sorry, got pulled away yesterday between opening the issue and updating the changelog. Done now. Thanks for sorting out the testing failure so quickly! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…-rs#372) Co-authored-by: KirbyER <7432155-KirbyER@users.noreply.gitlab.com>
Since
EPSILON
is defined as the difference between 1 and the next highest value, and values close to zero have higher precision, very small values were serialized with an extra ".0" e.g. "0.00000000000000005.0". These values then can't be properly deserialized. This fix compares the fractional part of the float to 0.0 instead of usingEPSILON
.Fixes #374.
CHANGELOG.md