My code:
$(document).ready(function() {
var num1 = 1473.735;
var num2 = 1473;
var num3 = num1 - num2;
alert(num3); // 0.7349999999999
}
Javascript seems to round my numbers very strangely.
How is it possible that javascript comes up with a strange decimal notation with such a simple calculation?
1473.735 - 1473 = 0.735, and not 0.7349999999999.
Here my Sandbox example: https://codepen.io/thomasveld/pen/yLebMMo
thanks in advance.