I came across this issue a while back when I was testing some HTML forms. The Maximum number of digits in JavaScript Number with a decimal point is only 16
I have t
In javascript You can't represent most decimal fractions exactly with binary floating point types (which is what ECMAScript uses to represent floating point value).
This is why javascript uses 16 numbers after the decimal point. for example -
Try to run:
var x = 3.14159265358979323846;
print(x.toFixed(20));
and see the following is being cast to float.
If you want to cast more then 16 points after the decimal point you can either: