[Numpy-discussion] making the distinction between -0.0 and 0.0..

Christopher Barker Chris.Barker at noaa.gov
Tue Sep 29 19:29:39 EDT 2009


josef.pktd at gmail.com wrote:
> WindowsXP:
> 
> Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
> (Intel)] on win32
>>>> struct.pack('>d', -0.0)
> '\x80\x00\x00\x00\x00\x00\x00\x00'
>>>> struct.pack('<d', -0.0)
> '\x00\x00\x00\x00\x00\x00\x00\x80'
> 
> Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
>>>> struct.pack('>d', -0.0)
> '\x00\x00\x00\x00\x00\x00\x00\x00'
>>>> struct.pack('<d', -0.0)
> '\x00\x00\x00\x00\x00\x00\x00\x00'
> 
> whatever that means,

It means this is a Python, not a compiler issue, and it was fixed 
between versions 2.4.3 and 2.5.2.

Water under the bridge...

-Chris





-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov



More information about the NumPy-Discussion mailing list