-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
bpo-46852: Building Python requires IEEE 754 support #31592
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
Conversation
Building Python now requires IEEE 754 (floating point) support. sys.float_repr_style is now always 'short'. Remove the _PY_SHORT_FLOAT_REPR macro.
|
@mdickinson: Is it ok to require an implementation of the HAVE_PY_SET_53BIT_PRECISION macro if the X87_DOUBLE_ROUNDING macro is defined? I'm not sure about the error message: |
|
@vstinner The change you're making here is stronger than merely requiring IEEE 754. This change will break CPython on platforms where:
Such platforms have certainly existed historically. |
No, I don't think it's okay, at least not without any warning. |
Here's an example report: https://stackoverflow.com/questions/29920294/what-causes-pythons-float-repr-style-to-use-legacy
|
|
@vstinner You've linked this PR to https://bugs.python.org/issue46852, but that issue looks completely different. This PR goes way beyond anything to do with removing |
|
I misunderstood the relationship between requiring IEEE 754 support and the ability to get short float repr. I started from: And then followed the breadcrumb. |
My plan is to remove code which is only needed for platforms not supporting IEEE 754. I wasn't sure if a new issue was needed or not. I hesitated to change https://bugs.python.org/issue46852 title. I understand that there are platforms which support IEEE 754 but don't support short float repr, because they don't use 64-bit float and lack HAVE_PY_SET_53BIT_PRECISION support. I just close my PR. Thanks for your review @mdickinson! |
Building Python now requires IEEE 754 (floating point) support.
sys.float_repr_style is now always 'short'.
Remove the _PY_SHORT_FLOAT_REPR macro.
https://bugs.python.org/issue46852