-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
Rounding errors in python #2236
Comments
From @iRomanyshyn on March 10, 2018 12:38 Oops, I made duplicate bug #617 with same problem. |
Alright I googled a bit about this issue. It most probably comes from the fact that we use clang instead of gcc to compile python. I believe it all stems from this change: https://bugs.python.org/issue30124
According to this SO thread that class is responsible for the short float display Comment in
Note in the python bug report:
|
Although compiling with gcc doesn't seem to change anything, so I am probably wrong.
Now we just need to figure out why termux is not one of those "most systems". Note: This isn't a bug in that it calculates wrong. Whether or not |
Maybe it's a bionic vs glibc thing? |
I asked the smart people on #python about it. Here's the conversation:
|
FWIW I am on aarch64 but python in Arch proot gives |
Maybe we can just patch out |
Any plans of releasing this change ? |
i will have a look today |
i will make a pull request in a little bit. |
pr is tested on i686 should be fine. |
Great work @its-pointless ! This should now be resolved in the latest package versions ( |
From @meeuw on March 2, 2018 20:50
When I convert a float to string I get weird rounding errors using Python 3.6.4:
According to the documentation it should display 0.1:
https://docs.python.org/3/tutorial/floatingpoint.html
I'm running termux on a Asus C101P Chromebook (ARMv8 processor).
Copied from original issue: termux/termux-app#604
The text was updated successfully, but these errors were encountered: