JS Built-ins
NumberMIN_SAFE_INTEGERintermediate

Number.MIN_SAFE_INTEGER β€” negative precision loss

πŸ“– Usage Example
// Most negative safely representable integer
Number.MIN_SAFE_INTEGER   // β†’ -9007199254740991
Number.MIN_SAFE_INTEGER - 1 === Number.MIN_SAFE_INTEGER - 2   // β†’ true (unsafe!)

Use Number.MIN_SAFE_INTEGER as the lower bound when working with negative integers to avoid silent precision loss.

Precision Loss Below MIN_SAFE_INTEGER

Just like positive integers beyond MAX_SAFE_INTEGER, integers below MIN_SAFE_INTEGER lose precision.

πŸ’‘ Hints (1)
  • β€’ Precision loss is symmetric: it happens below `MIN_SAFE_INTEGER` just as it does above `MAX_SAFE_INTEGER`.