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 cykerway
Recipients cykerway
Date 2021-12-24.13:17:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Acccording to:

>    If the argument is outside the range of a Python float, an OverflowError will be raised.

It is well known that the maximum value in IEEE 754 binary64 format is:

    >>> M = ((1<<53)-1)<<(1023-52)

So `(M+1)` will be out of range. But `float(M+1)` gives me:

    >>> float(M+1)

No OverflowError is thrown. Contrast this with:

    >>> float(M+M)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    OverflowError: int too large to convert to float

In another text:

>   ...Almost all machines today (November 2000) use IEEE-754 floating point arithmetic, and almost all platforms map Python floats to IEEE-754 “double precision”...

Is Python not following IEEE 754 binary64 format or something missing here?
Date User Action Args
2021-12-24 13:17:25cykerwaysetrecipients: + cykerway
2021-12-24 13:17:25cykerwaysetmessageid: <>
2021-12-24 13:17:25cykerwaylinkissue46173 messages
2021-12-24 13:17:25cykerwaycreate