it's just lost some super small amount during the calculation, and appear to be less then .5, so round down. You can ether add some small amount ((num+0.000001).toFixed(2)) or do the rounding yourself (Math.round(num*100)/100);
The number 1.025 dost not exists and is rounded to the nearest possible number: (1.025).toPrecision(18); // 1.02499999999999991. And for this number rounding to 1.02 is correct.
(num+0.000001).toFixed(2))or do the rounding yourself (Math.round(num*100)/100);1.025dost not exists and is rounded to the nearest possible number:(1.025).toPrecision(18); // 1.02499999999999991. And for this number rounding to1.02is correct.