-
Notifications
You must be signed in to change notification settings - Fork 2
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 up vs. rounding down #1
Comments
If there's a tie then we use standard IEEE 754 round-to-even rules. https://nigeltao.github.io/blog/2020/eisel-lemire.html#round-to-even has some examples. At least, that's what I remember doing. Let me know if there's still a discrepancy. |
It is important that parsing text-based formats to |
But floats with positive exponent are always even. Either direction would be round-to-even
Guess that explains it. Some numbers are more even than even |
I have run these tests on someone's double parser which discovered thousands of wrongly parsed numbers
But on closer examination, that parser still finds the nearest double number. Just there are two nearest numbers.
E.g. 9008309105029287 has 9008309105029288 (+1) and 9008309105029286 (-1)
Is it really important to return the larger one?
The text was updated successfully, but these errors were encountered: