Apple's Calculator app used to have an odd floating point rounding behavior (I filed a bug report and they fixed it):
14479.14
-
152.36
=
(result is 14326.78)
1143
/
78
=
(result is 14.6538461538461)
14479.14
-
152.36
=
(result is 14326.7799999999884)
Note that the first and third calculations are the same, yet they resulted in different displayed results!
I never understood this bug. I understand floating point, so understand that some numbers are not exactly representable. However, it should at least still be consistent! The same calculation should give the same results every time.
I never understood this bug. I understand floating point, so understand that some numbers are not exactly representable. However, it should at least still be consistent! The same calculation should give the same results every time.