floating point calculations in Excel can sometimes produce incorrect results.
I would say "unexpected" results, not "incorrect". In fact, they are precisely correct.
The point is: most decimal fractions cannot be represented exactly in binary "floating-point", which is what Excel uses internally to represent numeric values and perform arithmetic.
And the binary approximation of some decimal fractions might vary depending on the magnitude of the number. That is why, for example, 10.01 - 10 = 0.01 returns FALSE(!). (Hint: Format the result of 10.01 - 10 to display 17 decimal places.)
Excel FLOOR() function
Floor function in VBA code
Unexpected results of FLOOR function with time values
Shared Excel spreadsheet- Floor Formula not correctly rounding down
Videos
floating point calculations in Excel can sometimes produce incorrect results.
I would say "unexpected" results, not "incorrect". In fact, they are precisely correct.
The point is: most decimal fractions cannot be represented exactly in binary "floating-point", which is what Excel uses internally to represent numeric values and perform arithmetic.
And the binary approximation of some decimal fractions might vary depending on the magnitude of the number. That is why, for example, 10.01 - 10 = 0.01 returns FALSE(!). (Hint: Format the result of 10.01 - 10 to display 17 decimal places.)
This is what I get:
But floating point calculations in Excel can sometimes produce incorrect results. Joeu2004 will explain (I hope).