On 28.02.2022 13:36, Allin Cottrell wrote:
On Mon, 28 Feb 2022, Marcin Błażejowski wrote:
> Hi,
>
> why below script works fine for integers \in [2,53] and does not work
> for interegers >= 54?
That's because in a 64-bit floating-point value 11 bits are reserved
for the exponent, leaving only 53 for the mantissa. Integers up to
2^53 can be exactly represented as doubles, larger integers cannot be
exactly represented.
That is what I suspected. Thanks Allin!!!
Marcin
--
Marcin Błażejowski