Concept

Binary32 — where it appears

The 32-bit floating-point format, with 24 significant bits and a unit roundoff of about six parts in a hundred million. Graphics hardware and a good deal of machine learning run in it, so its digits run out within reach of an ordinary computation.

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

02468101201change of units, by exponent10⁰10¹10²10³10⁴10⁶10¹⁰10¹⁶10¹⁹10²⁰10⁴⁰10¹⁵⁰as writtenafter scalinga range questionlargest finite value3.4·10³⁸predicted boundary γ1.8·10¹⁹last γ that forms10¹⁹stops where scaling fails0not a poor answerno answer at all

The units that overflow before the answer does

A change of variable that is exact in the algebra requires γ² times a matrix to be a number the format can hold. In binary64 that is a bound nobody meets by accident. In binary32 it arrives at 10¹⁹ and in fp16 at 256, and past it there is no answer rather than a poor one.

arithmetic · Overflow
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
110¹10²10³10⁴10⁵10⁶110¹10²10³10⁴10⁵10⁶products‖QᵀQ − I‖ in units of the roundoffone factor repeateda pool of 4a pool of 64a pool of 1024a fresh factor each timebinary32 · order 3 · five drawsa fixed defect is a straight line

A repeated rotation drifts in a straight line

Composing rotation matrices drifts away from orthogonality, which is why graphics and robotics code re-orthonormalises. Rounding errors have no preferred sign, so a product of k rotations should lose orthogonality like the root of k, and it does when every factor is new: slope 0.52 over a million products. Multiply by the same factor every step, as a fixed-step integrator does, and the slope is 1.00. The factor's own rounding is one defect met in the same direction every time. At a million products in binary32 that is 622,000 units of roundoff against 2,400, a loss of 3.7 per cent. One polar step removes it at any period from ten products to ten thousand, the error in the rotation falling twenty times and hardly moving with how often it is run. Gram–Schmidt every ten products is six times worse, and for a reason that is not rounding.

orthogonality · Orthogonality
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
10²10³10⁴10⁵10⁶110¹10²10³10⁴10⁵10⁶number of productsloss of orthogonality, in unitsnearest binary32best of 512 neighboursgreedy, within 8 ulpsrounded afresh at randombinary32 · order three · rotation 1 of fivethree lines and a walk

A rounding chosen once is still repeated

One binary32 rotation multiplied into itself a million times loses orthogonality in a straight line, 622,126 units of roundoff on the first of five rotations, because its rounding defect is the same every time. The prediction was that choosing the best of the factor's representable neighbours would cut that rate tenfold and leave the angle alone. The best of 512 neighbours cuts it by 1 to 5 per cent. A greedy search eight ulps wide cuts it at most by half, and where it does, it moves the factor off the rotation and multiplies the angle's error by up to five. What works is to stop repeating the rounding: rounded afresh at random each product, the same factor loses 1,717 to 3,377 units at a million, and its angle is two hundred times nearer the truth than any fixed choice.

orthogonality · Orthogonality

Named alongside it

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

Unit roundoffCompensated summationFp16hypotLoss of orthogonalityOrthogonalityOverflowPolar decompositionScaled normExponent rangeGram–SchmidtMatrix polynomial

All concepts