series-cancellation
At its defaults it draws ‖aᵏ/k!‖ against ‖e^a‖ for moler and van loan's 2×2, scaled by 1. The terms of the Taylor series rise to 1.4·10⁷ at k = 16 and fall back; the sum they produce has norm 2.58, drawn as the flat line. The ratio is 5.42·10⁶, so that many digits are cancelled away before truncation is a question, and the computed exponential has a relative error of 5.2·10⁻⁹ after 77 terms. Scaling and squaring on the same matrix returns 8.5·10⁻¹⁴.
series-cancellation is one function in lib/figures/funm.js —
matrix functions — the definition that is not a method, and the vector that was wanted. 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.
The terms of the Taylor series rise to 1.4·10⁷ at k = 16 and fall back; the sum they produce has norm 2.58, drawn as the flat line. The ratio is 5.42·10⁶, so that many digits are cancelled away before truncation is a question, and the computed exponential has a relative error of 5.2·10⁻⁹ after 77 terms. Scaling and squaring on the same matrix returns 8.5·10⁻¹⁴.
scale: 1
The arguments are the ones A function of a matrix is not a function of its entries 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.
The terms of the Taylor series rise to 1.4·10⁷ at k = 16 and fall back; the sum they produce has norm 2.58, drawn as the flat line. The ratio is 5.42·10⁶, so that many digits are cancelled away before truncation is a question, and the computed exponential has a relative error of 5.2·10⁻⁹ after 77 terms. Scaling and squaring on the same matrix returns 8.5·10⁻¹⁴.
scale: 0.25
The arguments are the ones The series that has to be squared 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.
The terms of the Taylor series rise to 81.6 at k = 4 and fall back; the sum they produce has norm 5.37, drawn as the flat line. The ratio is 15.2, so that many digits are cancelled away before truncation is a question, and the computed exponential has a relative error of 1.87·10⁻¹⁵ after 36 terms. Scaling and squaring on the same matrix returns 1.65·10⁻¹⁴.
scale: 2
The arguments are the ones The series that has to be squared 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.
The terms of the Taylor series rise to 2.39·10¹⁴ at k = 33 and fall back; the sum they produce has norm 1.01, drawn as the flat line. The ratio is 2.36·10¹⁴, so that many digits are cancelled away before truncation is a question, and the computed exponential has a relative error of 0.107 after 127 terms. Scaling and squaring on the same matrix returns 1.72·10⁻¹³.
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.
7 distinct claims across 4 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.
a scaling the series still converges at in double
and it is as good as scaling and squaring, or better
and it is orders of magnitude behind scaling and squaring on the identical matrix
at half the matrix or less the series cancels only a few digits
at the full matrix and beyond the series cancels millions to one
LU is for square matrices
matmul shapes agree
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 function of a matrix is not a function of its entries
Everybody learns that f(A) means diagonalise, apply f to the eigenvalues, undiagonalise. That is a definition, not a method. On a matrix seven picometres from a defective one — with exact eigenvalues and eigenvectors from a closed form — the definition returns an answer wrong by sixty-five orders of magnitude, and a method that never mentions an eigenvalue returns the right one.
The arithmetic underneathCancellation takes the answer, not a digit
Subtracting two nearly equal numbers is exact. That is what makes it dangerous — the subtraction introduces no error at all, it exposes error the operands were already carrying, and the exposure can consume every significant figure at once.
Eigenvalues, singular values, rankThe series that has to be squared back
The Taylor series for the matrix exponential is not wrong — every term is computed correctly — and on Moler and Van Loan's two-by-two its largest term is 5.4 million times the answer it sums to. The method that replaces it scales the matrix down and squares the result back, and both halves of that sentence cost: too few squarings and the approximant is out of range, too many and each one doubles the rounding.