Forum Discussion
Excel Bug: the number 40091.84 isn't processed correctly.
This formula doesn't produce the correct result:
=40091.84-INT(40091.84)
The answer should be 0.84 but instead it produces 0.8399999999965080
To see this bug in action, you need to change the cell's formatting so that it displays all 16 decimal places.
Note: I found this bug because I SUM()ed a column of values and compared it using an IF() to validate that I had entered all the values into the table. The IF() failed. Investigation showed that 40091.84 isn't processed correctly. The formula I've posted is a trivial way to demonstrate the bug.
1 Reply
- Riny_van_EekelenPlatinum Contributor
Google for "floating point arithmetic" to read all about on how and why computers sometimes leave very small rounding differences. All very technical and in my opinion it's enough to know that it sometimes happens. And when it does, wrap your formula in ROUND( ...... , 2 ) if you want the result to be rounded to two decimals. So, it's not a bug.