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 skrah
Recipients benjamin.peterson, graingert, skrah, tim.peters, vstinner
Date 2020-06-25.09:57:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1593079025.6.0.397265697718.issue39277@roundup.psfhosted.org>
In-reply-to
Content
C99, 6.3.1.4 Real floating and integer:

"""
When a value of integer type is converted to a real floating type, if the value being
converted can be represented exactly in the new type, it is unchanged. If the value being
converted is in the range of values that can be represented but cannot be represented

exactly, the result is either the nearest higher or nearest lower representable value, chosen
in an implementation-defined manner. If the value being converted is outside the range of
values that can be represented, the behavior is undefined.
"""

So int64_t => double is implementation defined, but not undefined.

float___trunc___impl() looks correct to me (of course we can squash
that warning).
History
Date User Action Args
2020-06-25 09:57:05skrahsetrecipients: + skrah, tim.peters, vstinner, benjamin.peterson, graingert
2020-06-25 09:57:05skrahsetmessageid: <1593079025.6.0.397265697718.issue39277@roundup.psfhosted.org>
2020-06-25 09:57:05skrahlinkissue39277 messages
2020-06-25 09:57:05skrahcreate