The collection

Every essay

One idea per essay, grouped by field and ordered so that the earlier ones set up the later ones — but nothing here depends on being read in sequence.

Grouped by field, below. Or come at it from what is taught and refused here — every claim settled by an assertion that would have failed the build; or from the fields themselves, the depth ladders, or the figure library, where every generator publishes what it checked before it drew.

The arithmetic underneath 26Two errors, and whose fault they are 26Elimination, and the swap 26Orthogonality, measured 26Least squares, and the road not to take 26Regularisation, and the answer that is chosen 26Eigenvalues, singular values, rank 32The eigenvalue problem that is not linear 26Reduction, and what a model is for 25Iterating, instead of factorising 39Sparsity, and what elimination costs 26Structure, and the solver that cannot see it 26Neither sparse nor dense 26When the index is a tuple 24The matrix that is a graph 26Exact arithmetic, and what it costs instead 26Randomised, and the guarantee that changes kind 26Methods that were designed apart 25When the problem arrives again 26Where the flop count stopped predicting the time 26The answer that depends on the machine 26The matrix a constraint makes 25

The arithmetic underneath

The representable numbers are spaced, and the spacing doubles at every power of two. Everything else follows from that: why subtracting two close numbers destroys the part you wanted, why the order of a sum changes its value, and why the mantissa is the one parameter on this site worth putting on a slider.

[½, 1)[1, 2)[2, 4)0.5124gap 0.125gap 0.25 — twice as wide8 values per octavespacing doubles at each power of two

What a float can hold

The representable numbers are not a fine fuzz spread evenly over the line.

8 figures · Floating point, essay 1
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.

8 figures · Cancellation, essay 1
10¹10²10³10⁴10⁵10⁶10⁻⁹10⁻⁷10⁻⁵10⁻³10⁻¹number of terms addedrelative error against the exact sumin orderin a treecompensatedbinary32 · terms are 1/icompensated: 3·10⁻⁸

The order they are added in

Addition is associative in the algebra and is not associative in the arithmetic.

6 figures · Summation, essay 2
012345610⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹refinement step‖x − x*‖ / ‖x*‖a full double-precision solveresidual in24-bitresidual indoubleone argument apartκ·u of the factorisation6·10⁻⁴double residual, final3.2·10⁻¹³same-precision, final1.3·10⁻⁴30×30, κ = 10⁴, same factors in both runsidentical cost

Buying the accuracy back

Factorise in single precision, then correct the answer using residuals computed in double, and the result is what a full double-precision solve would have given.

7 figures · Mixed-precision, essay 1
10¹10²10³10⁴10⁵10⁶10⁷10⁸10⁹10¹⁰110⁴10⁸10¹²10¹⁶condition number κ(A)× short of a double solvebf16fp16fp32bf16fp16fp32the reference is soundreference solve, worst backward error10⁻¹⁶bfloat16 threshold κ256fp32 threshold κ1.7·10⁷eight refinement steps, residual always in doubleflat at 1 means it reached double

Where the hardware went

bfloat16 carries eight mantissa bits, which puts its refinement threshold at a condition number of 256.

7 figures · Mixed-precision, essay 2
3456789101100.250.50.751bits in the exponent fieldeach curve as a fraction of its own maximumbfloat16fp16rangeprecisionto 617 decadesto 3.9 digitswhat the split buysbfloat16: largest number3.4·10³⁸fp16: largest number6.6·10⁴a bit of exponent doubles the rangea bit of significand adds a third of a digit

The other half of a format

fp16 and tf32 have the same eleven significand bits and their largest numbers are 65,504 and 3.4·10³⁸.

5 figures · Floating point, essay 2
-47-37-27-17-7313233301234log₁₀ of the vector's normfp1611 bitsbfloat168 bitstf3211 bitsbinary3224 bitspale: the format's range · blue: √(Σ(xᵢ/m)²)·m · red: √(Σxᵢ²)fp16 and tf32 have the same eleven significand bitsand their bars do not overlap

A norm that overflows before it is a norm

The vector of sixteen thousands has a Euclidean norm of 4,000, which fp16 represents exactly.

7 figures · Overflow, essay 1
10⁻⁷10⁻⁵10⁻³10⁻¹⁰10⁻⁸10⁻⁶magnitudespacing to the next numberthe smallest normalgradualflush to zerosmallest normal6.1·10⁻⁵smallest subnormal6·10⁻⁸octaves of subnormals10pairs that lie under FTZ10the spacing stops halving and stays putwhich is what makes x − y = 0 mean x = y

The numbers below the smallest one

Below the smallest normal number the spacing stops halving and stays put, all the way to zero.

6 figures · Subnormals, essay 1
10⁻³10⁻¹10¹10³01magnitude448NaN — no ∞0.0156 — the smallest normaldrawn from the format's own rulespositive finite values126largest finite value448worst round-trip error0the subnormals are the evenly spaced ticks at the lefteverything a byte can be

Eight bits, and a format that breaks the rules

E4M3 reuses the exponent code IEEE reserves for infinities, so it reaches 448 where the same bits under IEEE's rules would reach 240 — and has no infinity left to signal an overflow with.

6 figures · Floating point, essay 3
10²10³10⁴10⁻⁸10⁻⁷10⁻⁶10⁻⁵10⁻⁴terms summedrelative error+∞, −∞ 1.01zero 1.00stochastic 0.50nearest 0.47√n against n, fittednearest, fitted exponent0.47stochastic, fitted exponent0.5toward +∞, fitted exponent1twelve seeds averaged at each sizethe slope is the bias, not the precision

The direction the error leans

The size of one rounding error is set by the precision.

7 figures · Rounding, essay 1
02505007501000250275300325350375additionsrunning totalround to nearest: nothing arrivesexactstochasticnearesta thousand additionshalf an ulp at 2561moves, round to nearest0moves, stochastic46relative error, nearest0.28relative error, stochastic0.0228 significand bits, unbounded exponenta flat line is not a small error

A coin flip that fixes the average

Add 0.1 to 256 a thousand times at eight significand bits and the answer is 256.

10 figures · Rounding, essay 2
half a stepthe 32 values of one block, in the order they arrivestep 0.0625one scale, thirty-two valuesoctaves inside the block1.9entries rounded to zero0worst error over its bound131 levels either side of zerothe largest entry chose the step

One exponent for thirty-two numbers

Share the exponent across a block and the cost per value drops from eight bits to 6.25, and the accuracy improves — up to about three octaves of spread inside a block.

6 figures · Block formats, essay 1
entries rounded to zero, of 320block, as given310block, sorted by size22E4M3, either order0median entry's relative errorblock, as given1block, sorted0.00321E4M30.022the same numbers, three waysdeleted, as given310deleted, sorted22deleted, per-element08-bit significands, blocks of 32sorting is free and changes no value

A bit buys an octave

The outlier a block survives is exactly two raised to its significand width — 8 at three bits, 32 at five, 128 at seven, 512 at nine.

8 figures · Block formats, essay 2
10⁻⁹10⁻⁶10⁻³110³10⁶13212937κ · usignificand bitsκu = 1a bound was provedthe method refusedit never returns a wrong boundlargest κu with a proof0.45smallest κu without one0.89cases refused, of the grid13a refusal is not a wide bound — it is no bound at alland it is the only failure mode here

A bound that is proved

Every error statement in the essays before this one is a measurement of one run.

8 figures · Interval, essay 1
11.522.511.52xyexactly one roota verdict, not a bound‖I − C F′(X)‖0.28width of X0.8width of K(X)0.23strictly inside is a proofand overlapping is nothing at all

Proving the answer is in the box

Every other method here computes a number and estimates how wrong it is.

8 figures · Interval, essay 2
grey: proved empty · filled: proved to contain exactly one roota covered squareboxes proved empty42boxes proved unique2undecided0operator evaluations87every rectangle carries a proofand the two crosshairs are where the roots are

Where the box is cut

A branch-and-bound with an interval operator settles a whole square — two roots proved unique, forty-two regions proved empty, nothing left undecided, in 87 evaluations.

8 figures · Interval, essay 3
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.

5 figures · Summation, essay 3
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.

4 figures · Overflow, essay 2
036912151810¹10²10³rotationswidththe enclosurethe seta rotation is an isometrymeasured growth a step1.4√2, from the geometry1.4enclosure ÷ set after 201024no rounding error is responsible for any of thisa higher precision does not touch it

Nine steps of pessimism

A proved bound is 8 to 26 times the error it bounds, at every precision from 16 to 40 significand bits.

7 figures · Interval, essay 4
deepest barrier, far well right to within halfno exponent limit40gradual, started at 102433fp16, gradual underflow23fp16, flush to zero13051015202530354010⁻⁵10⁻⁴10⁻³10⁻²10⁻¹110¹barrier depth, octaves below the near wellrelative error in the far well's masssmallest normalsmallest subnormalno exponent limitgradual, started at 1024fp16, gradual underflowfp16, flush to zeroan error of one: the far well is emptysubnormals bought nine octaves

The well on the far side of the band

Gradual underflow was said to buy a predicate and not an answer, because a quantity that has decayed into the subnormal range is already lost.

6 figures · Subnormals, essay 2
0510152025303540first barrier depth at which the far well is wrong by half, octavesfp16the band adds 11 octaves · starting at the top adds 15E4M3the band adds 2 octaves · starting at the top adds 10E5M2the band adds 3 octaves · starting at the top adds 14flush to zero13gradual underflow24flush, started at the top29gradual, started at the top39flush to zero5gradual underflow7flush, started at the top13gradual, started at the top17flush to zero13gradual underflow16flush, started at the top27gradual, started at the top30dot: median of nine chains · bar: their rangethe headroom is worth more than the band

The far well in a byte

Half precision's subnormals carried a two-well chain's far well ten octaves deeper than flush to zero, and the essay that measured it predicted that on the eight-bit formats the band would be worth almost nothing and starting high almost everything.

5 figures · Subnormals, essay 3
0102030405060first barrier depth at which the far well is wrong by half, octavesfp16E4M3E5M2gradual underflow, from onegradual, from the topcounter, floor and ceiling9 of 9counter, window from the rates9 of 9gradual underflow, from onegradual, from the topcounter, floor and ceiling1 of 9counter, window from the rates8 of 9gradual underflow, from onegradual, from the topcounter, floor and ceiling1 of 9counter, window from the rates1 of 9ring: chains that keep the far well past sixty octavesthe window is the unbounded exponent

Room for the step, not the value

Starting a recurrence at the top of an eight-bit format's range spends its headroom once.

5 figures · Subnormals, essay 4
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.

5 figures · Cancellation, essay 2
0.010.1110100the earlier recipe, product rounded41 of 41 over · median 62.0the same recurrence, exact24 of 41 over · median 6.3a well-mixed generator21 of 41 over · median 8.0one-pass error ÷ κ²u, one dot a seed; bar: medianfilled: the variance over-estimated; open: underthe line at one is the digits-lost rulethe exact recurrence does not lean

The generator that rounded its own product

A one-pass variance leaned the same way on forty-one seeds, and the low bits of a congruential generator were the suspect.

5 figures · Cancellation, essay 3