This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients hniksic, jbradaric, mark.dickinson, skrah
Date 2014-04-07.11:47:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1396871268.3.0.830455523772.issue21167@psf.upfronthosting.co.za>
In-reply-to
Content
> It doesn't (at the moment).

Sorry; that was an unhelpful kneejerk reply.

There are two aspects to this. (1) Currently, at least in theory, CPython doesn't require IEEE 754 *at all*:  in theory, it should work with whatever floating-point format the platform's "double" type happens to provide.  In practice I suspect there's a lot more IEEE 754 dependence in the codebase than we realize, and I'd expect to see a fair amount of test breaking if Python were ever to meet a non-IEEE 754 platform.  (Reports of any *recent* occurrences of Python in the wild meeting non-IEEE 754 platforms would be welcomed.)

(2) If CPython *does* figure out that it's running on an IEEE 754 platform then yes, care should be taken with compiler flags to ensure that we're not using compiler optimisations that have the potential to break IEEE semantics.  Without this there's a significant danger of float to string conversions getting messed up;  there are also a few odds and ends in the math and cmath libraries that depend on careful IEEE semantics.  (The implementations of fsum and log1p, for example.)

I think the right fix here is to add the relevant compiler flag to the build.  That said, I'd *also* love to see remaining uses of Py_NAN fixed to use _Py_dg_stdnan where available.
History
Date User Action Args
2014-04-07 11:47:48mark.dickinsonsetrecipients: + mark.dickinson, hniksic, skrah, jbradaric
2014-04-07 11:47:48mark.dickinsonsetmessageid: <1396871268.3.0.830455523772.issue21167@psf.upfronthosting.co.za>
2014-04-07 11:47:48mark.dickinsonlinkissue21167 messages
2014-04-07 11:47:47mark.dickinsoncreate