In my application, I am doing some client-side math, and it often comes out wrong due to floating point errors. To simplify the problem:
Math.floor((.3 - .1) * 10) == 1
There are other more complicated examples, but my question is this:
What is the appropriate way to solve for potential floating point errors? Example
Math.floor(fixFloat(.3 - .1) * 10) == 2
Thanks!