Portably generating infinity and NaN

Michael Hoffman cam.ac.uk at mh391.invalid
Mon Apr 16 11:59:05 CEST 2007


Paul Rubin wrote:
> skip at pobox.com writes:
>> 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?)
> 
> I wouldn't worry about it.  There are Python subsystems (like threads) that
> don't work on certain OS's, fine, total portability means not being able to
> rely on them, and that's ok.  I doubt any Crays are still running, or at least
> running any numerical code written in Python.  Same for VMS.

Do these systems provide infinities or NaN? If so, then fpconst could be 
extended to include them.
-- 
Michael Hoffman



More information about the Python-list mailing list