Concept

Compensated summation — where it appears

A running sum that carries the part of each term its total could not hold, and puts it back on the next step. Kahan's form costs four additions in place of one, and it removes the growth of a plain sum's error with the number of terms.

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

110¹10²10³110¹10²10³the accumulating quantity, relative to its first valuethe error, relative to its first valuethe bounds: slope 1what all three do: slope ½three mechanisms, one exponenta left-to-right sum0.49a chain of rotations0.55a residual recurrence0.51every bound's slope1spread of the three0.067a bound is a sum of the roundingsand the roundings have signs

Three walks and one bound

A left-to-right sum, a chain of three thousand rotations and a conjugate gradient residual recurrence share no arithmetic and no vocabulary. Each has a standard bound that is linear in whatever it accumulates against. All three come out at a half — 0.486, 0.554 and 0.507 — and nothing is rescaled.

arithmetic · Summation
units of the roundoffat k = 110.002at k = 122047compensated at 120.620481216202410⁻³10⁻²10⁻¹110¹10²10³10⁴k, the small entries are two to the minus kerror in units of the roundoffeither scale, largest firstsum compensatedbinary32 · length 4,096 · floored at 10⁻³a square half an ulp below the running sum

The division the norm did not need

Dividing by the largest entry is the standard repair for a Euclidean norm that overflows, and it was said to make about the same rounding errors as the expression it replaces. It is about a third worse on short vectors, up to 1.74 times, and it misses 801 of 4,518 integer norms the plain expression returns exactly, because a power of two buys the same range with no rounding at all. But the scale was never the main liability. One entry of size one and 4,095 entries of two to the minus twelve lose 2,047 units of roundoff in every route alike, from a sum that throws each small square away on arrival.

arithmetic · Overflow
4681012141610⁻²10⁻¹110¹10²10³10⁴k, the tail's entries are two to the minus kerror in units of the roundoffsquares added in ordersquares added pairwisebinary32 · length 4,096 · floored at a hundredtha cliff at almost every depth

Every equal tail has a cliff

A scaled binary32 norm of one entry of size one and 4,095 entries of two to the minus twelve is wrong by 2,047 units of roundoff, and that was read as a depth: a square half a spacing below the running sum is lost. It is not a depth. An equal tail at 0.003, eight bits shallower, loses 1,965 units, and 88 per cent of all depths between four and twelve lose more than a hundred. The error is one addition's rounding repeated once per entry, so a test that counts small entries misses nearly all of it, and a spread tail does not average it away. Adding the same squares pairwise, with the same number of additions, leaves under five units on everything measured.

arithmetic · Overflow

Named alongside it

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

Unit roundoffBinary32Scaled normSummationBackward errorConjugate gradientsExact ground truthFp16hypotLow-rank updateOverflowPairwise summation

All concepts