-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Floating point issue #89073
Comments
0.01 + 273.15 should equal 273.16 but in python 3.9.5 or earlier report as 273.15999999999997. |
This a limitation of the floating point type that python uses. See https://docs.python.org/3/tutorial/floatingpoint.html |
Eric, I was unaware of this document and its implementation in python. where the latter which should be 273.16 which is triple point temperature of water in Kelvin. This floating point variance explains some if the conditional test failures I have encountered. regards Alan Get Outlook for Android<https://aka.ms/ghei36\> From: report=bugs.python.org@roundup.psfhosted.org <report=bugs.python.org@roundup.psfhosted.org> on behalf of Eric V. Smith <report@bugs.python.org> Eric V. Smith <eric@trueblade.com> added the comment: This a limitation of the floating point type that python uses. See https://docs.python.org/3/tutorial/floatingpoint.html ---------- Python tracker <report@bugs.python.org> |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: