所有指数超过 52 的整数在 64 位浮点数中都是偶数吗

Are all integers with exponent over 52 are even in 64 bit floating point

我的结论是否正确:

all integers with exponent over 52 in the 64 bit floating point will be even?

是的。 F64 有 52 个编码尾数位,外加一个隐含位。我们讨论的是 'unbiased' 指数,因此您的值为 2^exp*1.mant

假设要将 F64 转换为整数,尾数将左移无偏指数。移动 52 将保证不需要四舍五入的整数。 53 将保证偶数,因为零会像您显示的那样移入。

the more we increase the exponent, the more integer numbers can not be represented

是的,但这比您描述的要快得多。您的示例值只是第一次出现。在 (2^53, 2^54) 范围内,如您所说,只能表示偶数,F64 中只存在所有整数的一半,因此在该范围内,所有 2^52 奇数整数都没有表示。