All books

Professional

Apps About Coach Log in Start reading

Quantitative Finance · Glossary

What is Catastrophic cancellation, compensated summation, Welford’s algorithm?

Also known as: catastrophic cancellation · compensated summation · Welford's algorithm

Definition 25.3 Quantitative Methods · Chapter 25 — Floating Point and Numerical Linear Algebra

Catastrophic cancellation is the loss of relative accuracy when two nearly equal rounded numbers are subtracted: the leading digits cancel and the rounding errors remain. Compensated summation (Kahan, 1965; in Neumaier’s variant, 1974) carries the rounding error of each addition in a separate variable and adds it back. Welford’s algorithm (1962) updates a running mean and sum of squared deviations one observation at a time.

Error of three summation algorithms against the exact (rational) sum of n simulated P&L entries whose magnitudes cycle over seven orders. Neumaier’s compensated sum stays below one unit in the last place of the total. Data: the chapter’s tutorial, seeded.
Figure 25.1. Error of three summation algorithms against the exact (rational) sum of nn simulated P&L entries whose magnitudes cycle over seven orders. Neumaier’s compensated sum stays below one unit in the last place of the total. Data: the chapter’s tutorial, seeded.
Read in context →