Message263576
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'. |
|
Date |
User |
Action |
Args |
2016-04-16 18:44:53 | ahrvoje | set | recipients:
+ ahrvoje |
2016-04-16 18:44:53 | ahrvoje | set | messageid: <1460832293.23.0.989531230725.issue26785@psf.upfronthosting.co.za> |
2016-04-16 18:44:53 | ahrvoje | link | issue26785 messages |
2016-04-16 18:44:53 | ahrvoje | create | |
|