Forum Discussion
cdnhermit
Jul 23, 2023Copper Contributor
cell's value in error in Excel
I have Excel 2016 version 2306 build 16529 20182. My excel converts 4.76 into 4.760000000000020000 and gives me an error I am trying this: 4.76 149.05 0.00 (134.29 ) (10.00 ) 4.76 ...
PeterBartholomew1
Jul 23, 2023Silver Contributor
That is normal. Computer calculation relies on binary arithmetic. Relatively few decimals have exact binary representations so small errors accumulate during floating point calculation (integers are exact). Tests for equality are then likely to fail so, instead, it is normal to test that the percentage error is extremely small, e.g.
= IF(ABS(100 * (calculated-input)/calculated) < 0.000000001, "ok", "error")