JavaScript, ECMAScript, MAX_SAFE_INTEGER, math symbols ℝ 𝔽 (2026)

By Xah Lee. Date: . Last updated: .

JavaScript question about MAX_SAFE_INTEGER and what i learned

massive tech geeking on JavaScript.

the question is, js spec says:

Number.MAX_SAFE_INTEGER is the largest integer n such that n and n + 1 are both exactly representable as a Number value.

why the n+1 ?

i asked ai. and learned several things.

AI sites xahlee info

grok ai MAX SAFE INTEGER 2026-10-29 2c8ee z
grok ai MAX SAFE INTEGER 2026-10-29 2c8ee z

ECMAScript 2015

here's ECMAScript 2015:

ECMAScript 2015 MAX SAFE INTEGER 2026-10-29 2cadd z
ECMAScript 2015 Β§Numbers and Dates#sec-number.max_safe_integer

ECMAScript 2021

here's ECMAScript 2021.

note, interesting that they used unicode ℝ from math for real numbers, but used it in a odd way, like a function name. they also used 𝔽, for finite field. funny.

ECMAScript 2021 MAX SAFE INTEGER 2026-10-29 2cbcf z
https://tc39.es/ecma262/2021/#sec-number.max_safe_integer

ECMAScript 2026

this is ECMAScript 2026 definition:

An integer n is a "safe integer" if and only if the Number value for n is not the Number value for any other integer.

this definition much more intutive. they made the change sometimes after 2021 edition.

ECMAScript 2026 MAX SAFE INTEGER 2026-10-29 2cd38 z
https://tc39.es/ecma262/2026/multipage/numbers-and-dates.html#sec-number.max_safe_integer

math symbols real ℝ and finite field 𝔽

here's a passage where they defined how they use these symbols.

ECMAScript 2026 MAX SAFE INTEGER 2026-10-30 1e673 z
ECMAScript 2026. 5.2.6 Mathematical Operations. https://tc39.es/ecma262/2026/multipage/notational-conventions.html#sec-mathematical-operations