Portably generating infinity and NaN
Michael Hoffman
cam.ac.uk at mh391.invalid
Sun Apr 15 19:04:12 EDT 2007
skip at pobox.com wrote:
> Michael> If you're going to change CPython to do this, I think adopting
> Michael> PEP 754, and using the fpconst module would be better than
> Michael> changing how float() works when called on string literals.
>
> But PEP 754 will only work for architectures supporting IEEE 754. I realize
> that's the vast majority of systems, but aren't there still a few Crays and
> VMS machines out there? (Do those architectures support NaN and Inf?)
Will float("NaN") work on these systems? (I don't know.) I guess it
probably works on some system that isn't IEEE 754.
--
Michael Hoffman
More information about the Python-list
mailing list