Generator

What the solver reported, and what it achieved

One function in the mixedcg library, called 43 times across 8 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 22 claims it put to the test while drawing them, and where it stands against the rule this site is named for.

At its defaults it draws what the solver reported, and what it achieved. Final relative residual and final relative error against the working precision, on a logarithmic vertical axis. The residual sits at the stopping tolerance at every precision — the method converged, by every test available to it. The error runs from 1.4·10⁻¹³ at 53 bits to 0.00597 at 8, tracking the unit roundoff, which is drawn beside it.

residual-blindness is one function in lib/figures/mixedcg.js — precision inside an iteration — what may be rounded, and what may not. Everything below came out of it during this build, at arguments taken from the essays rather than invented for this page. A figure here is the figure a reader meets in an essay, and if the generator changes, this page changes with it.

At its defaults

Drawn even though every essay passes arguments — which on this site is every essay, at 100% of placements since the standard pass. A default nothing exercises is a trap for the next essay to call this with none, and this is the page where a default that has drifted from the figures around it becomes visible.

What the solver reported, and what it achievedFinal relative residual and final relative error against the working precision, on a logarithmic vertical axis. The residual sits at the stopping tolerance at every precision — the method converged, by every test available to it. The error runs from 1.4·10⁻¹³ at 53 bits to 0.00597 at 8, tracking the unit roundoff, which is drawn beside it.614223038465410⁻¹³10⁻¹⁰10⁻⁷10⁻⁴working significand bitsrelative sizeerrorresidualuthe gap the solver cannot seeerror ÷ residual at 24 bits1.5·10⁶error ÷ residual at 16 bits2.3·10⁷error ÷ residual at 8 bits2.4·10¹⁰every convergence test passesand the answer is wrong in proportion to u

Final relative residual and final relative error against the working precision, on a logarithmic vertical axis. The residual sits at the stopping tolerance at every precision — the method converged, by every test available to it. The error runs from 1.4·10⁻¹³ at 53 bits to 0.00597 at 8, tracking the unit roundoff, which is drawn beside it.

show: "pl-over"

The arguments are the ones A bound on the fall, not the error passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

Where a five-step error window stops conjugate gradients, as the error there over the least error of the run, on twenty Strakoš runs and twenty-four runs with one isolated low eigenvalue, at four precisionsStrakoš, five values of ρ, 24 bits: 1.00, 1.00, 1.02, 1.00, 1.02; Strakoš, five values of ρ, 16 bits: 1.01, 1.03, 1.03, 1.01, 1.11; Strakoš, five values of ρ, 11 bits: 1.07, 1.01, 1.00, 1.00, 1.00; Strakoš, five values of ρ, 8 bits: 1.00, 1.01, 1.01, 1.00, 1.06; isolated at 0.01, 24 bits: 1.15, 1.01; isolated at 0.01, 16 bits: 1.00, 1.00; isolated at 0.01, 11 bits: 1.22, 1.04; isolated at 0.01, 8 bits: 1.12, 1.69; isolated at 0.001, 24 bits: 1.09, 1.00; isolated at 0.001, 16 bits: 1.03, 1.00; isolated at 0.001, 11 bits: 1.05, 8.67; isolated at 0.001, 8 bits: 1.22, 1.54; isolated at 0.0001, 24 bits: 1.48, 1.00; isolated at 0.0001, 16 bits: 1.04, 1.00; isolated at 0.0001, 11 bits: 1.17, 9.70; isolated at 0.0001, 8 bits: 8.24, 1.57. The dotted line is 1.5.11.524812Strakoš, five values of ρ24 bits16 bits11 bits8 bitsisolated at 0.0124 bits16 bits11 bits8 bitsisolated at 0.00124 bits16 bits11 bits8 bitsisolated at 0.000124 bits16 bits11 bits8 bitserror at window 5's stop over the least errorred: more than half again above the leastonly the isolated stall fools it

Strakoš, five values of ρ, 24 bits: 1.00, 1.00, 1.02, 1.00, 1.02; Strakoš, five values of ρ, 16 bits: 1.01, 1.03, 1.03, 1.01, 1.11; Strakoš, five values of ρ, 11 bits: 1.07, 1.01, 1.00, 1.00, 1.00; Strakoš, five values of ρ, 8 bits: 1.00, 1.01, 1.01, 1.00, 1.06; isolated at 0.01, 24 bits: 1.15, 1.01; isolated at 0.01, 16 bits: 1.00, 1.00; isolated at 0.01, 11 bits: 1.22, 1.04; isolated at 0.01, 8 bits: 1.12, 1.69; isolated at 0.001, 24 bits: 1.09, 1.00; isolated at 0.001, 16 bits: 1.03, 1.00; isolated at 0.001, 11 bits: 1.05, 8.67; isolated at 0.001, 8 bits: 1.22, 1.54; isolated at 0.0001, 24 bits: 1.48, 1.00; isolated at 0.0001, 16 bits: 1.04, 1.00; isolated at 0.0001, 11 bits: 1.17, 9.70; isolated at 0.0001, 8 bits: 8.24, 1.57. The dotted line is 1.5.

show: "pl-run", run: "isolated-8"

The arguments are the ones A bound on the fall, not the error passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The relative energy error of conjugate gradients on the isolated family with its low eigenvalue at 0.0001 carrying 0.01 of the energy, at 8 bits, the window-5 lower bound read from each step, and the threshold it is compared with, with the step window 5 stops atLeast error 1.2e-2 at step 100; window 5 stops at step 27, reading the bound from step 22, with the error 8.24 times the least. Error at steps 10, 20, 30, 40, 60: 2.4e-1, 1.0e-1, 1.0e-1, 1.0e-1, 1.8e-2; the bound from the same steps: 2.1e-1, 7.9e-3, 1.8e-3, 2.0e-2, 4.7e-3.isolated 10⁻⁴, share 10⁻², 8 bitswindow 5 stops at step27its error over the least8.2window 40's102040608010012014016010⁻⁸10⁻⁷10⁻⁶10⁻⁵10⁻⁴10⁻³10⁻²10⁻¹1steprelative energy errorerrorwindow-5 boundthresholddashed: the step window 5 reads its stop froma flat error, a falling bound

Least error 1.2e-2 at step 100; window 5 stops at step 27, reading the bound from step 22, with the error 8.24 times the least. Error at steps 10, 20, 30, 40, 60: 2.4e-1, 1.0e-1, 1.0e-1, 1.0e-1, 1.8e-2; the bound from the same steps: 2.1e-1, 7.9e-3, 1.8e-3, 2.0e-2, 4.7e-3.

show: "pl-ratio"

The arguments are the ones A bound on the fall, not the error passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The five-step window's lower bound over the true energy error it bounds, on every step from which the error falls by less than half in the next ten, for Strakoš runs and for runs with one isolated low eigenvalue at three depthsStrakoš: 217 stalled steps, ratio 0.548 to 0.859, median 0.651; isolated at 0.01: 68 stalled steps, ratio 0.120 to 0.814, median 0.387; isolated at 0.001: 106 stalled steps, ratio 0.040 to 0.845, median 0.175; isolated at 0.0001: 147 stalled steps, ratio 0.013 to 1.048, median 0.080.0.0030.010.030.10.31Strakošisolated at 0.01isolated at 0.001isolated at 0.0001window-5 bound over the error, on stalled stepsevery stalled step of every run, all precisionsa bound on the fall, not the error

Strakoš: 217 stalled steps, ratio 0.548 to 0.859, median 0.651; isolated at 0.01: 68 stalled steps, ratio 0.120 to 0.814, median 0.387; isolated at 0.001: 106 stalled steps, ratio 0.040 to 0.845, median 0.175; isolated at 0.0001: 147 stalled steps, ratio 0.013 to 1.048, median 0.080.

show: "pl-scale"

The arguments are the ones A bound on the fall, not the error passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The smallest ratio of the five-step window's lower bound to the true error on any stalled step, against the isolated eigenvalue, for two energy shares at 24 and 16 bits, with the square root of the eigenvalueshare 0.01, 24 bits: 0.121 at 0.01, 0.040 at 0.001, 0.013 at 0.0001; share 0.01, 16 bits: 0.121 at 0.01, 0.040 at 0.001, 0.013 at 0.0001; share 0.0001, 24 bits: 0.191 at 0.01, 0.042 at 0.001, 0.014 at 0.0001; share 0.0001, 16 bits: 0.132 at 0.01, 0.041 at 0.001, 0.013 at 0.0001. The square root of the eigenvalue: 0.100, 0.032, 0.010.10⁻⁴10⁻³10⁻²10⁻²10⁻¹1isolated eigenvalueleast bound over error on a stallshare 10⁻²share 10⁻⁴dotted: its square root24 and 16 bits, both sharesthe deeper, the blinder

share 0.01, 24 bits: 0.121 at 0.01, 0.040 at 0.001, 0.013 at 0.0001; share 0.01, 16 bits: 0.121 at 0.01, 0.040 at 0.001, 0.013 at 0.0001; share 0.0001, 24 bits: 0.191 at 0.01, 0.042 at 0.001, 0.014 at 0.0001; share 0.0001, 16 bits: 0.132 at 0.01, 0.041 at 0.001, 0.013 at 0.0001. The square root of the eigenvalue: 0.100, 0.032, 0.010.

show: "pl-windows"

The arguments are the ones A bound on the fall, not the error passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

Where each of four error windows stops conjugate gradients on the twenty-four runs with one isolated low eigenvalue, as the error there over the least error of the runwindow 5: 6 of 24 above 1.5, worst 9.70; window 10: 5 of 24 above 1.5, worst 9.70; window 20: 2 of 24 above 1.5, worst 1.57; window 40: 0 of 24 above 1.5, worst 1.11.11.524812window 5window 10window 20window 40error at the stop over the leastisolated family, three eigenvalues, two shares, four precisionsa window longer than the stall

window 5: 6 of 24 above 1.5, worst 9.70; window 10: 5 of 24 above 1.5, worst 9.70; window 20: 2 of 24 above 1.5, worst 1.57; window 40: 0 of 24 above 1.5, worst 1.11.

What it checked while drawing

Every figure above checked its own claims on the way to being drawn, and a claim that failed would have stopped the picture rather than shipped a wrong one. Those checks used to leave no trace at all: a passing one returned true and the only evidence the figure had checked anything was that nothing crashed. The list below is what they actually said, collected by running this generator with an observer installed — not a description of what it is believed to check.

22 distinct claims across 6 sets of arguments, grouped below by shape — because most of them are one sentence with a different number in it, and how many separate times that sentence was put to the test is the informative part.

the reported residual says converged at 32 bits — checked 5 times

a grid and precision the sweep runs

a grid the dense reference solve is affordable on

a grid the sweep runs

a grid, precision and preconditioner the sweep runs

a precision the dial draws

a precision the dial offers

a precision the sweep runs, or double as the control

a problem the clause is run on

a run the dial offers

a starting window, a floor no larger and a drop above one

a ρ and precision the sweep runs, or double as the control

an isolated eigenvalue and share the sweep uses

and the error tracks u across the range

and the true error is orders of magnitude above it

LU is for square matrices

matmul shapes agree

the incomplete Cholesky factorisation exists on the model problem

Against the rule

It draws a decomposition and prints its residual. It calls withRoundedWorkingPrecision, and every figure above carries the badge — which residualcheck verifies by looking for it in the emitted SVG rather than by finding the call that builds one. A badge that is constructed and then left out of the body is the failure that check exists for.

Across the library: the rule bites on 217 of 397 generators — 199 print a residual and 18 are exempt with a published reason; 180 factorise nothing. Read from lib/residual-rule.js, which is the same body the gate enforces from, and the gate's last check fails the build if this page and it disagree about any generator.

Where it is called

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

The answer that depends on the machine

A bound on the fall, not the error

A five-step window in Hestenes and Stiefel's error clause stopped forty steady conjugate-gradient runs promptly and safely, and was predicted to stay safe through a stall, because a lower bound on the error should sit just below an error that is sitting still. On twenty runs that stall because rounding has made them repeat themselves, it does: the bound stays above half the error on every stalled step and window 5 stops within 1.12 of the least. On runs that stall in exact arithmetic — one eigenvalue far below the other forty-seven, carrying a share of the energy — it stops more than half again too high on six runs of twenty-four, and on two at nine and ten times the least. The window sum is the energy the error lost over the window, which is a lower bound only because what is left is not negative. On a stall the loss is the other eigenvalues' remainder; it falls geometrically while the error waits, by a factor of about the square root of the isolated eigenvalue, and at low precision it crosses the threshold first.

The answer that depends on the machine

A floor the error has not reached

The residual a reduced-precision conjugate-gradient run stops on, recomputed in double, has a floor, and the floor can be predicted: on sixty runs of three problems it sits within a factor of 3.3 of a constant times u·‖|A||x|‖/‖b‖. The prediction was that the unit roundoff and the grid would be enough. They are not — adding the grid's size or κ(A) makes the prediction worse than u alone — and the quantity that works reads the solution. Nor is the floor a signal to stop. When the residual first comes within four times its own floor, the error is still a median 4.6 to 12.6 times its least, and on the slowest problem the least error arrives a median 76 steps later. A clause that stops there stops some run of every problem at three times its least error or more. What the floor can do is tell a run when to start checking often: switching to five-step checks within four times it keeps the error within a tenth of its least on both Laplacian problems and cuts the rate-set clause's overrun from 1,661 steps to 198.

The answer that depends on the machine

A later look is a worse stop

Every stopping test for reduced-precision conjugate gradients had read the residual, and the residual flattens tens of steps before the error stops falling. The method carries a cheap lower bound on its own energy error — the sum of each step's step length times its squared residual over a window of steps that follow — and a clause that stops when that bound falls below the working precision's share of the iterate stops twenty runs on the scaled Laplacian within 1.22 times their least error, a third of the residual clause's overrun. The prediction that it would stop within thirty steps of the least on the median run misses by three. And the window turns out to be a pure delay: in reduced precision the error creeps back up after its least, so the longer the window waits, the worse the stop.

The answer that depends on the machine

A short window from the start

Conjugate gradients carries a cheap lower bound on its own energy error, summed over a window of later steps, and a clause that stops when it falls below the working precision is safe — but the window is a pure delay. A window that starts at twenty and halves each time the estimate falls by a decade was predicted to keep the long window's safety and lose most of its delay. It loses the delay: under half window 20's overrun. It does not stop every run within 1.12 of its least error, as predicted; its worst is 1.126. And a plain window of five, which never needed to shrink, beats it on both counts at once — 1.097 at worst, 239 steps past the least in all against 335. The thing the shrinking was meant to avoid, stopping before the least, costs at most a few per cent, because near its least the error is flat.

The answer that depends on the machine

Five steps is a rate

A stagnation clause that checks the true residual every five steps, and stops when two checks in a row fail to halve it, stopped every reduced-precision conjugate-gradient run at the error it could reach. The worry was that five steps is a property of one fast problem, and the prediction was that on the unpreconditioned Laplacian, several times slower, it would stop some runs early. It does not: unpreconditioned conjugate gradients still halves its residual every five steps on these grids, and the clause stops all twenty runs within a tenth of the least error. Scale the same Laplacian's rows by a decade and a half and it stops nineteen of twenty at step fifteen, up to 775,000 times the attainable error. A clause that sets each interval from the reduction it last saw stops every run of all three kinds within two fifths of it — and on the fast runs pays for that with eight to twelve times as many steps past the best.

The answer that depends on the machine

The honest residual is not a stopping test

A conjugate-gradient run in reduced working precision reports a residual pinned near 10⁻¹² while its error spans eleven orders, and the repair was to recompute the residual in double. As a report it works: on thirty runs it lands within a factor of a quarter to five of the error. As the thing to stop on it fails outright: below 53 bits it is passed on none of twenty-five runs, which go on to the 300-step cap or until their own recurrence collapses — 7,694 products in all against 605. One clause fixes it. Stop also when two checks in a row fail to halve the double residual, and every run ends within thirty-six products, at the same error, reporting a number that means something — and at 8 and 11 bits on the larger grids, sooner than the recurrence's own test.

Least squares, and the road not to take

The observation that cannot be removed

Removing a rank-one term from a Cholesky factor needs a rotation that is not orthogonal, and the number under its square root is 1 − h, where h is the leverage of the row being removed. The algorithm's breakdown condition and the statistician's warning are the same quantity, arrived at from opposite ends, and neither field states it in the other's language.

The answer that depends on the machine

The reading that never moves

Across thirty runs — five grids from 36 to 196 unknowns, six working precisions from 53 significand bits down to 8 — the residual conjugate gradients stops on stays between 1.10·10⁻¹³ and 9.95·10⁻¹³. Over the same thirty runs the error of the answer spans a factor of 2.39·10¹¹, and the step count more than doubles. The one number the run publishes is the only one that responds to neither axis.

The whole library · All essays · What must fail