9,999,999,999,999,978 and 1 – 2 incorrect on iOS Calculator
A few observations (landscape mode only):
* The above results in 9,999,999,999,999,978.
* Add 1 a bunch of times and subtract 2 once to reach the same number.
* Add 1 a bunch of times and subtract 1 a bunch of times and the answer is still displayed in scientific notation, until 2 is subtracted, at which point the above number is displayed.
5 comments
[ 2.9 ms ] story [ 23.7 ms ] threadWhat Every Computer Scientist Should Know About Floating-Point Arithmetic
https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.h...
[0] https://github.com/microsoft/calculator/tree/master/src/Calc...
https://en.wikipedia.org/wiki/Pentium_FDIV_bug
As well as the Windows 3.1 Calc.exe bug that would give bizarre results if you subtracted close decimals like 1.111 - 1.011.