Concept

Stable formulation — where it appears

A way of writing a computation whose rounding errors stay small relative to the conditioning of the problem it solves. Two formulas equal in exact arithmetic can differ in this, because one may pass through a worse-conditioned intermediate problem; the variance in one pass is the standard example.

Named by 2 essays across one field — each of them below, with the objects they name alongside it.

10⁻¹²10⁻¹⁰10⁻⁸10⁻⁶10⁻⁴10⁻²110⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹xrelative error of the computed value(1 − cos x)/x², as written2 sin²(x/2)/x²no digits left at allbinary64 throughoutone function, two spellings · zero below 1.5·10⁻⁸

Cancellation takes the answer, not a digit

Subtracting two nearly equal numbers is exact. That is what makes it dangerous — the subtraction introduces no error at all, it exposes error the operands were already carrying, and the exposure can consume every significant figure at once.

arithmetic · Cancellation
24 bits, κ² 10⁶one-pass ÷ κ²u7.7compensated ÷ κ²u0.92Welford ÷ κu0.067two-pass, in u6.5110²10⁴10⁶10⁸10¹⁰10¹²10¹⁴110²10⁴10⁶10⁸10¹⁰10¹²10¹⁴10¹⁶κ² = 1 + mean² ÷ variancerelative error ÷ uevery digit goneκ²uone-passcompensated or pairwiseWelfordshifted by x₁two-passdashed purple: κ²u, the digits-lost rulethe formula sets the power of κ

The formula sets the power, the sum sets the constant

The one-pass variance was found losing three to sixty-nine times more than the digits-lost rule allows, and the explanation offered — operands built from a thousand roundings — was never priced. Measured against the exact variance of the stored data, the rule's ratio is the variance's own condition number squared, and the formula decides what power of it the error grows with: two for every one-pass variant, one for Welford's update, none for two passes or a shift. The summation decides only the constant in front — about 0.4√n for running sums, one for pairwise or compensated ones — and the sixty-nine was neither: it belonged to the random numbers.

arithmetic · Cancellation

Named alongside it

The objects these essays reach for when they reach for this one.

Catastrophic cancellationRelative errorCondition numberGaussian eliminationKahan summationPairwise summationSterbenz's lemmaSummation condition numberUnit roundoff

All concepts