I have javascript function that automatically adds input fields together, but adding numbers like 1.35 + 1.35 + 1.35 gives me an output of 4.050000000000001, just as an exam
You can use Math.round(total*100000000000)/100000000000; in the code. It will work for most of the cases
Math.round(total*100000000000)/100000000000;