Forum Discussion
praveenalbert
Nov 07, 2022Copper Contributor
Found this below bug
I added the below numbers using SUM function (showing here in the same order I had added rows) :
24.5
-8.1
-14.3
-1
-1.1
Final result should be ZERO but it shows me -2.22045E-15 as result which is wrong. If I change the top value from 24.5 to even 25.6, it is giving 0.1 which is correct but for this particular value it is giving weird output. Please check and correct.
- Riny_van_EekelenPlatinum Contributor
-2.22045E-15 is a very small number, very close to 0.0. When you format the number as General and increase the number of decimals considerably, you'll see this
Google for "floating point error excel" and you'll find many articles about this phenomenon. Most go into great depth, explaining the ins and outs of Excel's internal calculation engine. Read it all if you are really interest or just remember that when you see this kind of behavior that you can fix if by rounding the sum to, for example, 1 decimal. And just accept it as it's not going to go away.