Message233588
| 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:57 | vstinner | set | recipients:
+ vstinner, mark.dickinson, ethan.furman |
| 2015年01月07日 17:25:57 | vstinner | set | messageid: <1420651557.81.0.189420124018.issue23185@psf.upfronthosting.co.za> |
| 2015年01月07日 17:25:57 | vstinner | link | issue23185 messages |
| 2015年01月07日 17:25:57 | vstinner | create |
|