struct doesn't handle NaN values?

Jeff Epler jepler at unpythonic.net
Thu May 13 21:34:48 EDT 2004


On Fri, May 14, 2004 at 01:07:25AM +0000, Grant Edwards wrote:
> In order to provide robust translation between native and IEEE
> floating point formats, Python is going to have to know what
> the native format is.

No, it merely needs to use ldexp() with the proper values.  Did you try
reading what Python actually does?  See Objects/floatobject.c's
function family _PyFloat_{Unpack,Pack}{4,8}

Jeff




More information about the Python-list mailing list