Cyker Way <[email protected]> added the comment:
Alright that helps. I guess I now understand what's happening here. Here are
the two numbers in question:
>>> M = int('1'*53+'0'*971, 2)
>>> N = int('1'*53+'0'+'1'*970, 2)
M is the largest number in binary64 range, while N is the largest number that
does not emit an OverflowError when converted to binary64. N+1 will emit that
error. N-M == 2**970-1 which means N is larger than M that caused the confusion.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46173>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com