Antoine Pitrou added the comment:

Also, the fact that we support float('nan') and float('-nan') as producing 
different bit patterns means we should perhaps produce the right sign bit for 
each (it seems that's the problem here).

>>> import struct
>>> struct.pack("d", float("nan"))
'\x00\x00\x00\x00\x00\x00\xf8\xff'
>>> struct.pack("d", float("-nan"))
'\x00\x00\x00\x00\x00\x00\xf8\x7f'

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22590>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to