Friday 22 February 2019

Excel Strange Extra Digit


In Excel 2007/2010, I get this strange behaviour:


Formula in cell: =2.6+1.4+4.62-8.2
Result in cell: 0.420000000000002000

Weird extra '2' about 14DP in. Can anyone explain why this is happening please?



Answer



As mentioned in the comments, this is not a bug. It is due to the inevitable inaccuracy of floating point arithmetic due to the finite number of bits available to store values, resulting in an approximate representation which becomes apparent the more significant digits you choose to display.


Here are some useful articles for you:



No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...