Generator

sum-doubles

One function in the recompress library, called 8 times across 6 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 4 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 the singular values of a sum of two rank-4 blocks, and the 4 a truncation has to discard. A rank-4 block times a vector is a rank-4 block times a vector. A rank-4 block times a rank-4 block is a rank-4 block. A rank-4 block PLUS a rank-4 block is a rank-8 block, exactly, and the 8 bars here are why: the sum of two 4-dimensional spaces is generally 8-dimensional, and none of the 8 singular values is small. Truncating back to 4 costs 61.9 per cent of the block. Below the 8th the values are the unit roundoff, which is the check that the doubling is exact rather than approximate. Every product, every factorisation and every Schur complement inside this format is a chain of these, and there is nothing else to do: without the truncation the ranks double at every level and the format is dense by the bottom.

sum-doubles is one function in lib/figures/recompress.js — arithmetic in the format — the one operation it is not closed under, and what a hundred roundings cost. 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 singular values of a sum of two rank-4 blocks, and the 4 a truncation has to discardA rank-4 block times a vector is a rank-4 block times a vector. A rank-4 block times a rank-4 block is a rank-4 block. A rank-4 block PLUS a rank-4 block is a rank-8 block, exactly, and the 8 bars here are why: the sum of two 4-dimensional spaces is generally 8-dimensional, and none of the 8 singular values is small. Truncating back to 4 costs 61.9 per cent of the block. Below the 8th the values are the unit roundoff, which is the check that the doubling is exact rather than approximate. Every product, every factorisation and every Schur complement inside this format is a chain of these, and there is nothing else to do: without the truncation the ranks double at every level and the format is dense by the bottom.σ ⁄ σ₁ of the sum, 64 × 64σ1, kept1σ2, kept0.922σ3, kept0.812σ4, kept0.785σ5, discarded0.778σ6, discarded0.758σ7, discarded0.658σ8, discarded0.571σ92.63·10⁻¹⁶σ102.3·10⁻¹⁶the operation that is not closedrank of each term4rank of the sum8truncated back to4cost of the truncation0.62the best there is0.62two planesmake a four-space

A rank-4 block times a vector is a rank-4 block times a vector. A rank-4 block times a rank-4 block is a rank-4 block. A rank-4 block PLUS a rank-4 block is a rank-8 block, exactly, and the 8 bars here are why: the sum of two 4-dimensional spaces is generally 8-dimensional, and none of the 8 singular values is small. Truncating back to 4 costs 61.9 per cent of the block. Below the 8th the values are the unit roundoff, which is the check that the doubling is exact rather than approximate. Every product, every factorisation and every Schur complement inside this format is a chain of these, and there is nothing else to do: without the truncation the ranks double at every level and the format is dense by the bottom.

k: 4

The arguments are the ones A correction cheaper than the problem 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 singular values of a sum of two rank-4 blocks, and the 4 a truncation has to discardA rank-4 block times a vector is a rank-4 block times a vector. A rank-4 block times a rank-4 block is a rank-4 block. A rank-4 block PLUS a rank-4 block is a rank-8 block, exactly, and the 8 bars here are why: the sum of two 4-dimensional spaces is generally 8-dimensional, and none of the 8 singular values is small. Truncating back to 4 costs 61.9 per cent of the block. Below the 8th the values are the unit roundoff, which is the check that the doubling is exact rather than approximate. Every product, every factorisation and every Schur complement inside this format is a chain of these, and there is nothing else to do: without the truncation the ranks double at every level and the format is dense by the bottom.σ ⁄ σ₁ of the sum, 64 × 64σ1, kept1σ2, kept0.922σ3, kept0.812σ4, kept0.785σ5, discarded0.778σ6, discarded0.758σ7, discarded0.658σ8, discarded0.571σ92.63·10⁻¹⁶σ102.3·10⁻¹⁶the operation that is not closedrank of each term4rank of the sum8truncated back to4cost of the truncation0.62the best there is0.62two planesmake a four-space

A rank-4 block times a vector is a rank-4 block times a vector. A rank-4 block times a rank-4 block is a rank-4 block. A rank-4 block PLUS a rank-4 block is a rank-8 block, exactly, and the 8 bars here are why: the sum of two 4-dimensional spaces is generally 8-dimensional, and none of the 8 singular values is small. Truncating back to 4 costs 61.9 per cent of the block. Below the 8th the values are the unit roundoff, which is the check that the doubling is exact rather than approximate. Every product, every factorisation and every Schur complement inside this format is a chain of these, and there is nothing else to do: without the truncation the ranks double at every level and the format is dense by the bottom.

k: 6

The arguments are the ones The order they are added in 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 singular values of a sum of two rank-6 blocks, and the 6 a truncation has to discardA rank-6 block times a vector is a rank-6 block times a vector. A rank-6 block times a rank-6 block is a rank-6 block. A rank-6 block PLUS a rank-6 block is a rank-12 block, exactly, and the 12 bars here are why: the sum of two 6-dimensional spaces is generally 12-dimensional, and none of the 12 singular values is small. Truncating back to 6 costs 57.8 per cent of the block. Below the 12th the values are the unit roundoff, which is the check that the doubling is exact rather than approximate. Every product, every factorisation and every Schur complement inside this format is a chain of these, and there is nothing else to do: without the truncation the ranks double at every level and the format is dense by the bottom.σ ⁄ σ₁ of the sum, 64 × 64σ1, kept1σ2, kept0.904σ3, kept0.873σ4, kept0.811σ5, kept0.782σ6, kept0.727σ7, discarded0.707σ8, discarded0.654σ9, discarded0.647σ10, discarded0.579σ11, discarded0.561σ12, discarded0.444σ132.9·10⁻¹⁶σ142.4·10⁻¹⁶the operation that is not closedrank of each term6rank of the sum12truncated back to6cost of the truncation0.58the best there is0.58two planesmake a four-space

A rank-6 block times a vector is a rank-6 block times a vector. A rank-6 block times a rank-6 block is a rank-6 block. A rank-6 block PLUS a rank-6 block is a rank-12 block, exactly, and the 12 bars here are why: the sum of two 6-dimensional spaces is generally 12-dimensional, and none of the 12 singular values is small. Truncating back to 6 costs 57.8 per cent of the block. Below the 12th the values are the unit roundoff, which is the check that the doubling is exact rather than approximate. Every product, every factorisation and every Schur complement inside this format is a chain of these, and there is nothing else to do: without the truncation the ranks double at every level and the format is dense by the bottom.

k: 8

The arguments are the ones The rounding that was not the problem 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 singular values of a sum of two rank-8 blocks, and the 8 a truncation has to discardA rank-8 block times a vector is a rank-8 block times a vector. A rank-8 block times a rank-8 block is a rank-8 block. A rank-8 block PLUS a rank-8 block is a rank-16 block, exactly, and the 16 bars here are why: the sum of two 8-dimensional spaces is generally 16-dimensional, and none of the 16 singular values is small. Truncating back to 8 costs 54.4 per cent of the block. Below the 16th the values are the unit roundoff, which is the check that the doubling is exact rather than approximate. Every product, every factorisation and every Schur complement inside this format is a chain of these, and there is nothing else to do: without the truncation the ranks double at every level and the format is dense by the bottom.σ ⁄ σ₁ of the sum, 64 × 64σ1, kept1σ2, kept0.914σ3, kept0.899σ4, kept0.842σ5, kept0.827σ6, kept0.773σ7, kept0.749σ8, kept0.681σ9, discarded0.655σ10, discarded0.62σ11, discarded0.589σ12, discarded0.562σ13, discarded0.543σ14, discarded0.499σ15, discarded0.461σ16, discarded0.389σ172.96·10⁻¹⁶σ182.77·10⁻¹⁶the operation that is not closedrank of each term8rank of the sum16truncated back to8cost of the truncation0.54the best there is0.54two planesmake a four-space

A rank-8 block times a vector is a rank-8 block times a vector. A rank-8 block times a rank-8 block is a rank-8 block. A rank-8 block PLUS a rank-8 block is a rank-16 block, exactly, and the 16 bars here are why: the sum of two 8-dimensional spaces is generally 16-dimensional, and none of the 16 singular values is small. Truncating back to 8 costs 54.4 per cent of the block. Below the 16th the values are the unit roundoff, which is the check that the doubling is exact rather than approximate. Every product, every factorisation and every Schur complement inside this format is a chain of these, and there is nothing else to do: without the truncation the ranks double at every level and the format is dense by the bottom.

k: 3

The arguments are the ones The rounding that was not the problem 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 singular values of a sum of two rank-3 blocks, and the 3 a truncation has to discardA rank-3 block times a vector is a rank-3 block times a vector. A rank-3 block times a rank-3 block is a rank-3 block. A rank-3 block PLUS a rank-3 block is a rank-6 block, exactly, and the 6 bars here are why: the sum of two 3-dimensional spaces is generally 6-dimensional, and none of the 6 singular values is small. Truncating back to 3 costs 56.8 per cent of the block. Below the 6th the values are the unit roundoff, which is the check that the doubling is exact rather than approximate. Every product, every factorisation and every Schur complement inside this format is a chain of these, and there is nothing else to do: without the truncation the ranks double at every level and the format is dense by the bottom.σ ⁄ σ₁ of the sum, 64 × 64σ1, kept1σ2, kept0.881σ3, kept0.814σ4, discarded0.696σ5, discarded0.639σ6, discarded0.521σ72.17·10⁻¹⁶σ81.89·10⁻¹⁶the operation that is not closedrank of each term3rank of the sum6truncated back to3cost of the truncation0.57the best there is0.57two planesmake a four-space

A rank-3 block times a vector is a rank-3 block times a vector. A rank-3 block times a rank-3 block is a rank-3 block. A rank-3 block PLUS a rank-3 block is a rank-6 block, exactly, and the 6 bars here are why: the sum of two 3-dimensional spaces is generally 6-dimensional, and none of the 6 singular values is small. Truncating back to 3 costs 56.8 per cent of the block. Below the 6th the values are the unit roundoff, which is the check that the doubling is exact rather than approximate. Every product, every factorisation and every Schur complement inside this format is a chain of these, and there is nothing else to do: without the truncation the ranks double at every level and the format is dense by the bottom.

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.

4 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.

a rank the figure has room to draw twice

concatenating the factors doubles the rank

matmul shapes agree

the truncation done through the factors is the truncation of the matrix

Against the rule

It draws a decomposition and prints its residual. It calls svd, truncate, 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 141 of 264 generators — 126 print a residual and 15 are exempt with a published reason; 123 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.

Least squares, and the road not to take

A correction cheaper than the problem

Sherman and Morrison's formula updates a solved system for a rank-one change to the matrix, at 4n² operations instead of (2/3)n³. It is exact algebra. On a problem whose updated matrix is the identity — condition number one, the easiest system there is — it returns a forward error of 2.5·10⁻⁴ where a direct solve returns 10⁻¹⁶.

Orthogonality, measured

Orthogonal 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.

The arithmetic underneath

The order they are added in

Addition is associative in the algebra and is not associative in the arithmetic. The same million numbers, added in a different order, give answers that differ in the third significant figure — and the fix is not a wider float, it is a different order.

Neither sparse nor dense

The rounding that was not the problem

A rank-k block plus a rank-k block is a rank-2k block, exactly, so every arithmetic in this format truncates after every addition. A Cholesky performed inside it does ninety-eight of those and its residual is 1.14·10⁻⁹ against a representation error of 1.40·10⁻⁹ — the roundings cost nothing measurable.

Neither sparse nor dense

The same matrix, numbered twice

One symmetric permutation. The condition number is 24.3948 either way to eight digits and the Frobenius norm is 6.13996414·10³ either way to twelve. The partition that stored 27,008 numbers now finds no admissible pair anywhere and stores all 65,536, and the format that compresses regardless stores 118,208.

Neither sparse nor dense

The test that costs what it saves

The partition that refuses to compress a touching pair keeps every rank at five while the other lets them climb from nine to thirteen. It also stores more numbers at every size measured — 67,968 against 61,440 at n = 512 — and which of those two facts matters is a question about how large the problem is going to get.

The whole library · All essays · What must fail