The MDN Web Docs refers that the Number.MAX_SAFE_INTEGER
constant represents the maximum safe integer in JavaScript which has value of 2^53 - 1
.
my question: is Number.MAX_SAFE_INTEGER
has also value of (2^53 - 1)
in 32-bit computer?
and if yes it has the same value how can JavaScript store this number (2^53 - 1)
in 32 bits?!
Yes. All JavaScript Number
s are represented using IEEE 754 binary64 (A.K.A. double precision floating point). This format takes 64 bits of space, but most modern 32-bit processors support it natively, and even if they didn't, it would be possible to implement floating point operations in software.
The "32-bit" in 32-bit processor refers to the word size.