Excel/calculation error on excel
It seems that Excel does not recognize a zero when the equation leading to zero involves numbers that are not integers and when the equation involves an empty cell (or a cell equal to zero). it is difficult to describe without an example.
I enclose a screen shot of simple calculations (row 2 shows the formulae entered in row 3). The total of each equation should be equal to zero, but it is not (see True, false).
Do you know if it is a well known documented problem in Excel? I cannot find any trace of this anywhere. I thought that considering your experience, you might know more about this.
i would really appreciate if you could let me know if there is some documentation about it somewhere.
thanks a lot.
It is a well known problems that computers in general have problem with representing floating point numbers. Just like decimal numbers have problems representing some numbers exactly such as 1/3 and 1/7. Most applications represent these numbers using the IEEE standard as does excel. So those problems are inherent in non-integer numerical representation and storage in a computer and these problems evident in Excel. Over the various excel versions, microsoft has tried to overcome this problem by doing some internal rounding - but i tis not perfect. In you first example, where you get True, I suspect excel has intervened and corrected the result. In your other two renditions, I suspect the adding of the third term prevents excel from performing the corrective algorithm.
Generally when working with floating point (non-integer) numbers, it is best to do overt rounding or account for these imperfections when doing comparisons. For example, to check for zero you might do
so you are defining any result smaller than that very small number to actually be zero.
Here is a microsoft support article that gives a good explanation
Floating-point arithmetic may give inaccurate results in Excel
a much larger article.
(Complete) Tutorial to Understand IEEE Floating-Point Errors
XL: Comparison of Values Does Not Return Correct Result
one on how to work within the problem
How to correct rounding errors in floating-point arithmetic
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here