ECMAScript 6\'s Number.MAX_SAFE_INTEGER
supposedly represents the maximum numerical value JavaScript can store before issues arise with floating point precision
the only number which is in close proximity of another when compared with its next number shows true
9007199254740992 == 9007199254740993
true
9007199254740993 == 9007199254740994
false
9007199254740991 == 9007199254740992
false
9007199254740997 == 9007199254740998
false
I would say its because while Math.pow(2, 53)
is the largest directly representable integer, its unsafe in that its also the first value who's representation is also an approximation of another value:
9007199254740992 == 9007199254740993 // true
In contrast to Math.pow(2, 53) - 1
:
9007199254740991 == 9007199254740993 // false