Stefan Krah <ste...@bytereef.org> added the comment:
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). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39277> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com