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 ahrvoje
Recipients ahrvoje
Date 2016-04-16.18:44:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1460832293.23.0.989531230725.issue26785@psf.upfronthosting.co.za>
In-reply-to
Content
repr of -nan value should contain the sign so the round-trip could be assured. NaN value sign (bit) could be seen as not relevant or even uninterpretable information, but it is actually used in real-life situations, the fact substantiated by section 6.3 of IEEE-754 2008 standard.

>>> from math import copysign
>>> x = float("-nan")
>>> copysign(1.0, x)
-1.0

This is correct. Also proves the value contains the sign information.

>>> repr(x)
nan

Not correct. Should be '-nan'.
History
Date User Action Args
2016-04-16 18:44:53ahrvojesetrecipients: + ahrvoje
2016-04-16 18:44:53ahrvojesetmessageid: <1460832293.23.0.989531230725.issue26785@psf.upfronthosting.co.za>
2016-04-16 18:44:53ahrvojelinkissue26785 messages
2016-04-16 18:44:53ahrvojecreate