Message372335
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). |
|
Date |
User |
Action |
Args |
2020-06-25 09:57:05 | skrah | set | recipients:
+ skrah, tim.peters, vstinner, benjamin.peterson, graingert |
2020-06-25 09:57:05 | skrah | set | messageid: <1593079025.6.0.397265697718.issue39277@roundup.psfhosted.org> |
2020-06-25 09:57:05 | skrah | link | issue39277 messages |
2020-06-25 09:57:05 | skrah | create | |
|