9 Add/subtract and the unbiased rounding myth
In 1982, The Vancouver Stock Exchange established a stock index, scaled to initially equal 1000. The index steadily declined to 520 over the next two years even though the economy was healthy. The index was being updated by adding and subtracting changes in the stocks, using floats rounded to three decimals, so rounding error accumulated. Recalculating the stock index from the actual stock prices showed the index was actually 1098, not 520. The accumulation of approximations would have been obvious, had unum arithmetic been used.
9.1 Re-learning the addition table … for all real numbers
The prototype ...
Get The End of Error now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.