Hello vnorberg,

this is a well known problem called floating point inaccuracy and affects a lot of software products. This is due to the fact that Umberto is calculating with binary numbers: To calculate the formulas in your example the decimal numbers have to be converted to binary numbers and after the calculation the result has to be converted back to a decimal number. This may result in fragments like in your second example.

There is a way to circumvent this problem programmatically, but it takes a lot of memory and is much slower, especially when dealing with millions of numbers like in Umberto. Excel, for example, works the same way and you get the same results when calculating your formulas in Excel.

I´m afraid there´s no general solution for this problem. Maybe you can rearrange your formulas so the fragments do not occur, e.g. if you change the second formula to:

70/1.2*10000000-70/1.2/10000001*10000001*10000000

you will get the correct result (= 0)