Generator

series-cancellation

One function in the funm library, called 5 times across 3 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 7 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 ‖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.

‖Aᵏ/k!‖ against ‖e^A‖ for Moler and Van Loan's 2×2, scaled by 1The 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⁻¹⁴.01020304050607010⁻⁶10⁻³110³10⁶10⁹k‖Aᵏ/k!‖‖e^A‖ = 2.6largest term 1.4·10⁷what the series throws awaylargest term1.4·10⁷‖e^A‖2.6digits cancelled away5.4·10⁶error after the sum5.2·10⁻⁹every term is computed correctlyand the sum has lost seven digits

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.

‖Aᵏ/k!‖ against ‖e^A‖ for Moler and Van Loan's 2×2, scaled by 1The 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⁻¹⁴.01020304050607010⁻⁶10⁻³110³10⁶10⁹k‖Aᵏ/k!‖‖e^A‖ = 2.6largest term 1.4·10⁷what the series throws awaylargest term1.4·10⁷‖e^A‖2.6digits cancelled away5.4·10⁶error after the sum5.2·10⁻⁹every term is computed correctlyand the sum has lost seven digits

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.

‖Aᵏ/k!‖ against ‖e^A‖ for Moler and Van Loan's 2×2, scaled by 0.25The 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⁻¹⁴.0510152025303510⁻⁶10⁻⁴10⁻²110²k‖Aᵏ/k!‖‖e^A‖ = 5.4largest term 82what the series throws awaylargest term82‖e^A‖5.4digits cancelled away15error after the sum1.9·10⁻¹⁵every term is computed correctlyand the sum has lost seven digits

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.

‖Aᵏ/k!‖ against ‖e^A‖ for Moler and Van Loan's 2×2, scaled by 2The 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⁻¹³.016324864809611210⁻⁶10⁻²10²10⁶10¹⁰10¹⁴k‖Aᵏ/k!‖‖e^A‖ = 1largest term 2.4·10¹⁴what the series throws awaylargest term2.4·10¹⁴‖e^A‖1digits cancelled away2.4·10¹⁴error after the sum0.11every term is computed correctlyand the sum has lost seven digits

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.

The whole library · All essays · What must fail