2 ms·
> 64-bit floats lose precision before 64-bit ints overflow. More precisely, a 64 bit IEEE 754 ("double precision") has 53 bits worth of "integer"[0], which all
by masklinn 13y ago
> 64-bit floats lose precision before 64-bit ints overflow.
More precisely, a 64 bit IEEE 754 ("double precision") has 53 bits worth of "integer"[0], which allows for 15 digits (and almost, but not quite, 16: it can encode 15.95 decimal digits)
[0] even though only 52 bits are allocated to the fraction, because the fraction part has an implicit 53rd bit set to 1 outside of special values