polar-iterations
At its defaults it draws three iterations to the orthogonal polar factor, κ = 10^4. Newton's iteration, X ← (X + X⁻ᵀ)/2, halves its error per step while it is far away and only becomes quadratic near the end: it is at 57 after six steps. Higham's scaling costs two norms and no extra factorisation and reaches thirteen digits in 7. Newton–Schulz, X ← X(3I − XᵀX)/2, uses no inverse at all — two matrix products a step and nothing that reads an entry — and needs 28 steps to get to the same place.
polar-iterations is one function in lib/figures/polar.js —
the polar factor — the nearest orthogonal matrix, and two ways to it without an svd. 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.
Newton's iteration, X ← (X + X⁻ᵀ)/2, halves its error per step while it is far away and only becomes quadratic near the end: it is at 57 after six steps. Higham's scaling costs two norms and no extra factorisation and reaches thirteen digits in 7. Newton–Schulz, X ← X(3I − XᵀX)/2, uses no inverse at all — two matrix products a step and nothing that reads an entry — and needs 28 steps to get to the same place.
logKappa: 4
The arguments are the ones A block size is a property of the machine 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.
Newton's iteration, X ← (X + X⁻ᵀ)/2, halves its error per step while it is far away and only becomes quadratic near the end: it is at 57 after six steps. Higham's scaling costs two norms and no extra factorisation and reaches thirteen digits in 7. Newton–Schulz, X ← X(3I − XᵀX)/2, uses no inverse at all — two matrix products a step and nothing that reads an entry — and needs 28 steps to get to the same place.
logKappa: 1
The arguments are the ones An iteration that only multiplies 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.
Newton's iteration, X ← (X + X⁻ᵀ)/2, halves its error per step while it is far away and only becomes quadratic near the end: it is at 1.9·10⁻⁶ after six steps. Higham's scaling costs two norms and no extra factorisation and reaches thirteen digits in 5. Newton–Schulz, X ← X(3I − XᵀX)/2, uses no inverse at all — two matrix products a step and nothing that reads an entry — and needs 11 steps to get to the same place.
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.
10 distinct claims across 3 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 constructed matrix has κ = 10000 — asserted 2 times
a conditioning all three iterations still reach
a power of ten rather than an exponent literal
a size the repeated inversions can afford
and Newton–Schulz gets there too
in more of them, which is what it charges for using no inverse
LU is for square matrices
matmul shapes agree
scaled Newton reaches thirteen digits within eight steps
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 92
of 198 generators —
77 print a residual and
15 are exempt with a published reason;
106 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 block size is a property of the machine
Three lines of counting say the best block size is √(M/3). Scanned over every integer at five fast memories, the measured optimum is √M − 2 — exactly, at all five. The count has the right scaling and the wrong constant, low by a factor of 1.56, and the wrong form: the answer is affine in √M rather than proportional to it.
Iterating, instead of factorisingA rate that is known in advance
On the model problem, Jacobi contracts by cos(π/(n+1)) per step, Gauss–Seidel by its square, and optimally relaxed SOR by a number given in closed form. Three rates, all known before anything runs, and all measurable against what runs.
Orthogonality, measuredAn iteration that only multiplies
Newton's iteration for the polar factor needs an inverse every step. Newton–Schulz needs only matrix products — nothing that reads an entry, nothing that pivots — and it converges if and only if every singular value is below √3. At 1.73205 it converges and at 1.73206 it returns an orthogonal matrix that is not the answer, with a residual of 5·10⁻¹⁶ and nothing to say so.
Where the flop count stopped predicting the timeMemory bought with messages
Holding four copies of the data instead of one is supposed to cut a matrix multiplication's communication by √4. Measured on a machine of 64 processors it costs 14% more traffic; at 576 it saves 44%, which is 72% of what the law promises. The memory is exactly four times, and that part is not asymptotic.
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.
Orthogonality, measuredThe nearest orthogonal matrix
Every field that has to clean up a drifted rotation reaches for QR, and QR does not answer the question. The nearest orthogonal matrix is the orthogonal factor of the polar decomposition — nearer by about a tenth, and, more to the point, the same matrix whatever order the columns were written in. QR's answer changes completely.
Where the flop count stopped predicting the timeThe same arithmetic at a different price
A blocked and an unblocked elimination perform 72,568 operations each — the same operations, associated differently — choose the same pivots, and return a factorisation identical to the last bit: ‖PA − LU‖/‖A‖ = 4.487946226420872·10⁻¹⁶ in both. One of them moves 41,332 words between fast and slow memory and the other moves 19,476.
The arithmetic underneathWhere the hardware went
bfloat16 carries eight mantissa bits, which puts its refinement threshold at a condition number of 256. That is not an exotic matrix. It is an ordinary one, and past it the method still improves the answer by a factor of four hundred while getting nowhere near a usable one.