[issue6646] test_pickle fails on AIX -- 6.9999999999999994e-308 != 6.9999999999999984e-308

Sridhar Ratnakumar report at bugs.python.org
Thu Aug 6 21:13:03 CEST 2009


Sridhar Ratnakumar <sridharr at activestate.com> added the comment:

It is a powerpc 64-bit AIX machine:

>>> os.uname()
('AIX', 'asaixv5152', '1', '5', '000C763E4C00')
>>> platform.uname()
('AIX', 'asaixv5152', '1', '5', '000C763E4C00', 'powerpc')

The commands you have requested:

>>> from sys import float_info
>>> float_info
sys.floatinfo(max=1.7976931348623157e+308, max_exp=1024, 
max_10_exp=308, min=2.2250738585072014e-308, min_exp=-1021, 
min_10_exp=-307, dig=15, mant_dig=53, epsilon=2.2204460492503131e-16, 
radix=2, rounds=1)
>>> from pickle import dumps, loads
>>> x = 7e-308
>>> x
6.9999999999999994e-308
>>> p = [dumps(x, proto) for proto in range(3)]
>>> p
['F6.9999999999999994e-308\n.', 'G\x00)*\xee\xa4Z\xae\xdf.', '\x80\x02G
\x00)*\xee\xa4Z\xae\xdf.']
>>> up = [loads(z) for z in p]
>>> up
[6.9999999999999984e-308, 6.9999999999999994e-308, 
6.9999999999999994e-308]
>>>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6646>
_______________________________________


More information about the Python-bugs-list mailing list