Note the fact that there are two "maximum" numbers. One is the largest number of floating points, which the other answers pointed out correctly (Number.MAX_VALUE, 1.79E+308).
The other is the largest number whole which can be represented unambiguously, which is a 16-digit value (Number.MAX_SAFE_INTEGER or 2 to 53a power minus 1). This level is important for programs that need to do accurate accounts, such as financial systems.
Above this plateau, adding small values to a large number no longer works right:
Number.MAX_SAFE_INTEGER
9007199254740991
Number.MAX_SAFE_INTEGER + 2
9007199254740992
Number.MAX_SAFE_INTEGER + 3
9007199254740994
Number.MAX_SAFE_INTEGER + 4
9007199254740996
Number.MAX_SAFE_INTEGER + 5
9007199254740996
Another way to understand this problem is: in floating point, the precision is only maintained in a sum if the two numbers summed have a magnitude difference no greater than 15 digits.
I don’t remember you answering a question of mine before :). thanks!
– Wallace Maxters