Portably generating infinity and NaN

Michael Hoffman cam.ac.uk at mh391.invalid
Thu Apr 12 21:20:37 CEST 2007

Michael Hoffman wrote:

> 2. Using an extension module (for example, numarray.ieeespecial will do 
> it).

I guess I could always use ctypes as well, and say, get -inf from 
libc.log(ctypes.c_double(0.0)). Although we're venturing away from 
portable territory then, since specifying how to load libc will be 
different on different platforms.
Michael Hoffman

More information about the Python-list mailing list