
Ian M. answered 05/14/19
JavaScript, Web Application Engineer
JavaScript math loses precision very quickly; that's one of the reasons it's hardly ever used in scientific settings. Numbers in JavaScript are 64-bit floating point values (https://www.ecma-international.org/ecma-262/5.1/#sec-8.5), which means numbers must fall between +/- 9007199254740991 or suffer inaccuracies.
For numbers beyond that range, you'll need something other than the JavaScript Number object. A quick Google search for "JavaScript big integer" produces some results, but I'm not familiar enough with any of them to recommend one over another.
Let me know if I can be of more assistance.
Ian