1
JavaScriptIntermediate#dom#events
Numbers are IEEE-754 doubles, so many decimals cannot be represented exactly and tiny rounding errors appear. Compare with a small epsilon or work in integer minor units for money.
0.1 + 0.2; // 0.30000000000000004 Math.abs(0.1 + 0.2 - 0.3) < 1e-9; // true (0.1*100 + 0.2*100) / 100; // 0.3