homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients ethan.furman, mark.dickinson, vstinner
Date 2015年01月07日.17:25:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1420651557.81.0.189420124018.issue23185@psf.upfronthosting.co.za>
In-reply-to
Content
Oh, NaN can be signed?
>>> struct.pack("d", float("nan"))
b'\x00\x00\x00\x00\x00\x00\xf8\x7f'
>>> struct.pack("d", float("-nan"))
b'\x00\x00\x00\x00\x00\x00\xf8\xff'
>>> struct.pack("d", -float("nan"))
b'\x00\x00\x00\x00\x00\x00\xf8\xff'
>>> struct.pack("d", -float("-nan"))
b'\x00\x00\x00\x00\x00\x00\xf8\x7f'
Why does Python return the same representation for positive and negative NaN?
>>> float("nan")
nan
>>> float("-nan")
nan
History
Date User Action Args
2015年01月07日 17:25:57vstinnersetrecipients: + vstinner, mark.dickinson, ethan.furman
2015年01月07日 17:25:57vstinnersetmessageid: <1420651557.81.0.189420124018.issue23185@psf.upfronthosting.co.za>
2015年01月07日 17:25:57vstinnerlinkissue23185 messages
2015年01月07日 17:25:57vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /