1-Visitor
September 2, 2011
Question
Bug? Error in simple sum...
- September 2, 2011
- 5 replies
- 8004 views
Hello,
I just stumbled upon the weird fact that for Prime1 certain sums are not absolutely correct. For example, Prime1 calculates
1.4 + 0.2 = 1.6
So far, so good.
But if I check if (1.4+0.2) is the same as 1.6, Prime1 tells me it is NOT!
When I create the difference it gives out
1.4 + 0.2 - 1.6 = 2.22*10^-16
which is almost correct but just not correct enough!
In the case of
1.2 + 0.4 = 1.6
Prime1 works correctly.
Please see the attached Prime1-sheet for further examples.
Is this a common error with any calculation software or is this just mathcad?
Is there a way to avoid this error?
Best regards
Sebastian

