Message399909
>>> float.fromhex('0x0.8p-1074')
0.0
>>> float.fromhex('0x.8p-1074')
5e-324
One of them is obviously wrong. It's the second one, because:
- The smallest denormal is 0x1p-1074
- Therefore, 0x0.8p-1074 is a tie for rounding purposes.
- The digit in the last place is even because the number is zero, and there is a tie, which implies rounding down. |
|
Date |
User |
Action |
Args |
2021-08-19 11:34:02 | pgimeno | set | recipients:
+ pgimeno |
2021-08-19 11:34:02 | pgimeno | set | messageid: <1629372842.45.0.638068158675.issue44954@roundup.psfhosted.org> |
2021-08-19 11:34:02 | pgimeno | link | issue44954 messages |
2021-08-19 11:34:02 | pgimeno | create | |
|