3 ms·
IEEE 754 can represent integers larger than MAX_SAFE_INTEGER, just not all of them: https://en.wikipedia.org/wiki/Double-precision_floating-point_format#Precis
by js2 3y ago
IEEE 754 can represent integers larger than MAX_SAFE_INTEGER, just not all of them:
https://en.wikipedia.org/wiki/Double-precision_floating-point_format#Precision_limitations_on_integer_values https://en.wikipedia.org/wiki/Double-precision_floating-poin...
That's still going to be a greater than 0.1% chance of hitting a non-representable value though.
- hinkley 3y agoIt’s been a long long time. I may be remembering the ratio wrong, or we might have been clipping the range a bit.
- Dylan16807 3y ago> or we might have been clipping the range a bit Well it's a pretty abrupt change. 53 bits work fine, at 54 bits a quarter of numbers get truncated, at 55 it's half.