0

Addition of 9007199254740992 and 1 gives 9007199254740992.

n = 9007199254740992 + 1; // n is equal to 9007199254740992

And, addition of 9658921879781125 and 1 gives 9658921879781124.

m = 9658921879781125 + 1; // m is equal to 9658921879781124

And, if mathematic operations in Javascript are inaccurate for large numbers, what is the way to get around this problem.

  • 2
    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER – Randy Casburn Apr 09 '18 at 01:58
  • JavaScript only support 53 bit integers. Check this post on [large-integers](http://2ality.com/2012/07/large-integers.html). – Carloluis Apr 09 '18 at 02:09

0 Answers0