second-pass
At its defaults it draws implied orthogonality of four factorisations of a 256×8 matrix. Four curves against the condition number, both axes logarithmic. Cholesky QR's implied orthogonality has a fitted slope of 1.99 and reaches 0.373; the same routine run twice has a slope of 0.96 and reaches 3.75·10⁻⁹, which is where the Householder sweep and the reduction tree are.
second-pass is one function in lib/figures/comm.js —
two ways of buying something back — a second pass, and memory spent on messages. 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.
Four curves against the condition number, both axes logarithmic. Cholesky QR's implied orthogonality has a fitted slope of 1.99 and reaches 0.373; the same routine run twice has a slope of 0.96 and reaches 3.75·10⁻⁹, which is where the Householder sweep and the reduction tree are.
n: 12
The arguments are the ones A reflection cannot stop being one passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.
Four curves against the condition number, both axes logarithmic. Cholesky QR's implied orthogonality has a fitted slope of 1.98 and reaches 0.762; the same routine run twice has a slope of 0.95 and reaches 1.79·10⁻⁹, which is where the Householder sweep and the reduction tree are.
n: 6
The arguments are the ones Buying the accuracy back passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.
Four curves against the condition number, both axes logarithmic. Cholesky QR's implied orthogonality has a fitted slope of 1.96 and reaches 0.169; the same routine run twice has a slope of 0.79 and reaches 2.32·10⁻¹⁰, which is where the Householder sweep and the reduction tree are.
n: 8
The arguments are the ones Doing it twice passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.
Four curves against the condition number, both axes logarithmic. Cholesky QR's implied orthogonality has a fitted slope of 1.99 and reaches 0.373; the same routine run twice has a slope of 0.96 and reaches 3.75·10⁻⁹, which is where the Householder sweep and the reduction tree are.
n: 16
The arguments are the ones One exponent for thirty-two numbers passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.
Four curves against the condition number, both axes logarithmic. Cholesky QR's implied orthogonality has a fitted slope of 1.97 and reaches 0.354; the same routine run twice has a slope of 0.91 and reaches 2.08·10⁻⁹, which is where the Householder sweep and the reduction tree are.
What it checked while drawing
Every figure above asserted its own claims on the way to being drawn, and a claim that failed
would have failed the build rather than drawn a wrong picture. Those assertions 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.
15 distinct claims across 5 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.
both Cholesky runs return an answer at κ = 100 — asserted 2 times
a matrix tall enough for the factorisation to be tall-skinny
a width the dense reference is affordable at
and two cost κ
both Cholesky runs return an answer at κ = 10⁴
both Cholesky runs return an answer at κ = 10⁵
both Cholesky runs return an answer at κ = 10⁶
both Cholesky runs return an answer at κ = 10⁷
both Cholesky runs return an answer at κ = 10⁸
condition numbers below the cliff, where all four return an answer
each row block is at least as tall as it is wide
matmul shapes agree
one pass costs κ²
with the pair matching the sweep at the worst conditioning drawn
Against the rule
The rule does not apply to it. It factorises nothing, so there is no residual it could be withholding. That is worth stating rather than leaving blank: a site that reported the rule as satisfied by every generator would be counting mostly generators the rule never reached.
Across the library: the rule bites on 70
of 151 generators —
55 print a residual and
15 are exempt with a published reason;
81 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.
A reflection cannot stop being one
Householder QR holds orthogonality at 10⁻¹⁵ whatever the condition number of the matrix, and Gram–Schmidt does not. The reason is not that it is more careful. It is that its Q is built from unit vectors, and rounding a unit vector gives a different reflection rather than a broken one.
The arithmetic underneathBuying 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. Compute those residuals in single instead and the identical algorithm, at identical cost, recovers nothing.
Where the flop count stopped predicting the timeDoing it twice
Cholesky QR squares the condition number — a fitted slope of 1.95 in κ against the Householder sweep's 1.00. Run the identical routine a second time on the Q it returned and the slope is 0.93, the orthogonality is at or below the sweep's at every κ, and the price is one more all-reduce.
The arithmetic underneathOne 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. Past that a single outlier deletes the thirty-one values beside it, and the 2-norm barely notices.
Orthogonality, measuredOrthogonal is a number
"Q is orthogonal" is a claim about a measurable quantity, ‖QᵀQ − I‖, and on the eight-by-eight Hilbert matrix two standard algorithms return 10⁻¹⁵ and 1 for it. The one that returns 1 still reconstructs the matrix perfectly, which is why nothing warns you.
Two errors, and whose fault they areThe condition number is an amplifier
κ is usually introduced as a definition and then quoted. It is a measurement: perturb the input by a known amount, look at how much the output moves, and the largest ratio you can find is the number.
The arithmetic underneathThe direction the error leans
The size of one rounding error is set by the precision. How ten thousand of them combine is set by something else entirely — the rounding mode — and the fitted exponents are 0.47 for round-to-nearest and 1.01 for round-toward-infinity, on identical data at identical precision.
Two errors, and whose fault they areThe exact answer to a nearby problem
A good algorithm does not give an approximate answer to your problem. It gives the exact answer to a problem very close to yours — and once that is the definition, a wrong result has two possible authors and they can be measured apart.
Where the flop count stopped predicting the timeThe message and the word
Three factorisations of one matrix on sixteen processors: 48 communication rounds, 4, and 4. The words sent are 1,170, 1,170 and 2,160 — so the method with the fewest rounds sends the most words, and the count that separates the three is the one no operation count can see.
Least squares, and the road not to takeThe projection and the right angle
The least-squares solution is the one whose residual is perpendicular to everything the columns can reach. That is not a mnemonic — it is an equation, Aᵀr = 0, and the computed answer satisfies it to 10⁻¹⁶.
Least squares, and the road not to takeThe road that squares the problem
The normal equations are the first method every course teaches and the method no library uses. Forming AᵀA squares the condition number, and below ε = √u it does not degrade — it produces a matrix that is exactly singular, from data that was perfectly usable.
Orthogonality, measuredTwo Gram–Schmidts
One argument changes. Classical Gram–Schmidt projects the original column onto each previous direction; modified projects what is left of it. In exact arithmetic the coefficients are identical. In floating point they differ by eight orders of magnitude in the thing that matters.