I am experiencing the following bug in my JS.
(1.001 * Math.pow(10, 3))
Instead of returning 1001
this returns 1000.99999999
. I am trying to eradicate this bug and have been looking at using this big.js library.
I am unsure what to do to fix this issue.
I have tried the following but it doesn't seem to work.
var x = new Big(10);
(1.001 * x.pow(3));
This produces the same bug as without the library.