Generator

solve-cost

One function in the hsolve library, called 23 times across 15 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 9 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 multiplications in a hierarchical solve and in a dense factorisation, and where they cross. Both counted rather than estimated: the recursion carries a counter and reports what it actually did. The dense factorisation is n³/3 and rises at exactly three per doubling. The hierarchical solve rises at 2.13, 1.93, 1.74 — falling, because the cost is n log²n and its exponent is on its way to one. The two cross between n = 64 and n = 128: below it the format is the more expensive way to solve the system, at 1.48 times the dense count, and at n = 512 it is 6.2 times cheaper. Every point returns an answer at a backward error of about 1.4·10⁻¹⁰, so the comparison is between two ways of getting the same thing.

solve-cost is one function in lib/figures/hsolve.js — solving with it — the recursion that assembles nothing, and the backward error that was chosen. 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.

Multiplications in a hierarchical solve and in a dense factorisation, and where they crossBoth counted rather than estimated: the recursion carries a counter and reports what it actually did. The dense factorisation is n³/3 and rises at exactly three per doubling. The hierarchical solve rises at 2.13, 1.93, 1.74 — falling, because the cost is n log²n and its exponent is on its way to one. The two cross between n = 64 and n = 128: below it the format is the more expensive way to solve the system, at 1.48 times the dense count, and at n = 512 it is 6.2 times cheaper. Every point returns an answer at a backward error of about 1.4·10⁻¹⁰, so the comparison is between two ways of getting the same thing.567891010⁴10⁵10⁶10⁷10⁸10⁹log₂ nmultiplicationsdense factorisation, n³⁄3the recursion, countedwhere the format starts payingratio at n = 641.5ratio at n = 5120.16exponent, first doubling2.1exponent, last doubling1.7backward error1.4·10⁻¹⁰cheaper is a sizenot a property

Both counted rather than estimated: the recursion carries a counter and reports what it actually did. The dense factorisation is n³/3 and rises at exactly three per doubling. The hierarchical solve rises at 2.13, 1.93, 1.74 — falling, because the cost is n log²n and its exponent is on its way to one. The two cross between n = 64 and n = 128: below it the format is the more expensive way to solve the system, at 1.48 times the dense count, and at n = 512 it is 6.2 times cheaper. Every point returns an answer at a backward error of about 1.4·10⁻¹⁰, so the comparison is between two ways of getting the same thing.

logEps: -6

The arguments are the ones A block nobody can call sparse 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.

Multiplications in a hierarchical solve and in a dense factorisation, and where they crossBoth counted rather than estimated: the recursion carries a counter and reports what it actually did. The dense factorisation is n³/3 and rises at exactly three per doubling. The hierarchical solve rises at 2.13, 1.88, 1.73 — falling, because the cost is n log²n and its exponent is on its way to one. The two cross between n = 64 and n = 64: below it the format is the more expensive way to solve the system, at 0.92 times the dense count, and at n = 512 it is 10.3 times cheaper. Every point returns an answer at a backward error of about 2.3·10⁻⁸, so the comparison is between two ways of getting the same thing.567891010⁴10⁵10⁶10⁷10⁸10⁹log₂ nmultiplicationsdense factorisation, n³⁄3the recursion, countedwhere the format starts payingratio at n = 640.92ratio at n = 5120.097exponent, first doubling2.1exponent, last doubling1.7backward error2.3·10⁻⁸cheaper is a sizenot a property

Both counted rather than estimated: the recursion carries a counter and reports what it actually did. The dense factorisation is n³/3 and rises at exactly three per doubling. The hierarchical solve rises at 2.13, 1.88, 1.73 — falling, because the cost is n log²n and its exponent is on its way to one. The two cross between n = 64 and n = 64: below it the format is the more expensive way to solve the system, at 0.92 times the dense count, and at n = 512 it is 10.3 times cheaper. Every point returns an answer at a backward error of about 2.3·10⁻⁸, so the comparison is between two ways of getting the same thing.

logEps: -8

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.

Multiplications in a hierarchical solve and in a dense factorisation, and where they crossBoth counted rather than estimated: the recursion carries a counter and reports what it actually did. The dense factorisation is n³/3 and rises at exactly three per doubling. The hierarchical solve rises at 2.13, 1.93, 1.74 — falling, because the cost is n log²n and its exponent is on its way to one. The two cross between n = 64 and n = 128: below it the format is the more expensive way to solve the system, at 1.48 times the dense count, and at n = 512 it is 6.2 times cheaper. Every point returns an answer at a backward error of about 1.4·10⁻¹⁰, so the comparison is between two ways of getting the same thing.567891010⁴10⁵10⁶10⁷10⁸10⁹log₂ nmultiplicationsdense factorisation, n³⁄3the recursion, countedwhere the format starts payingratio at n = 641.5ratio at n = 5120.16exponent, first doubling2.1exponent, last doubling1.7backward error1.4·10⁻¹⁰cheaper is a sizenot a property

Both counted rather than estimated: the recursion carries a counter and reports what it actually did. The dense factorisation is n³/3 and rises at exactly three per doubling. The hierarchical solve rises at 2.13, 1.93, 1.74 — falling, because the cost is n log²n and its exponent is on its way to one. The two cross between n = 64 and n = 128: below it the format is the more expensive way to solve the system, at 1.48 times the dense count, and at n = 512 it is 6.2 times cheaper. Every point returns an answer at a backward error of about 1.4·10⁻¹⁰, so the comparison is between two ways of getting the same thing.

logEps: -10

The arguments are the ones A rank that is a number of digits 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.

Multiplications in a hierarchical solve and in a dense factorisation, and where they crossBoth counted rather than estimated: the recursion carries a counter and reports what it actually did. The dense factorisation is n³/3 and rises at exactly three per doubling. The hierarchical solve rises at 2.18, 1.93, 1.78 — falling, because the cost is n log²n and its exponent is on its way to one. The two cross between n = 128 and n = 256: below it the format is the more expensive way to solve the system, at 1.97 times the dense count, and at n = 512 it is 4.4 times cheaper. Every point returns an answer at a backward error of about 1.1·10⁻¹², so the comparison is between two ways of getting the same thing.567891010⁴10⁵10⁶10⁷10⁸10⁹log₂ nmultiplicationsdense factorisation, n³⁄3the recursion, countedwhere the format starts payingratio at n = 642ratio at n = 5120.23exponent, first doubling2.2exponent, last doubling1.8backward error1.1·10⁻¹²cheaper is a sizenot a property

Both counted rather than estimated: the recursion carries a counter and reports what it actually did. The dense factorisation is n³/3 and rises at exactly three per doubling. The hierarchical solve rises at 2.18, 1.93, 1.78 — falling, because the cost is n log²n and its exponent is on its way to one. The two cross between n = 128 and n = 256: below it the format is the more expensive way to solve the system, at 1.97 times the dense count, and at n = 512 it is 4.4 times cheaper. Every point returns an answer at a backward error of about 1.1·10⁻¹², so the comparison is between two ways of getting the same thing.

logEps: -12

The arguments are the ones An accuracy that is a backward error 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.

Multiplications in a hierarchical solve and in a dense factorisation, and where they crossBoth counted rather than estimated: the recursion carries a counter and reports what it actually did. The dense factorisation is n³/3 and rises at exactly three per doubling. The hierarchical solve rises at 2.25, 1.95, 1.78 — falling, because the cost is n log²n and its exponent is on its way to one. The two cross between n = 128 and n = 256: below it the format is the more expensive way to solve the system, at 2.36 times the dense count, and at n = 512 it is 3.4 times cheaper. Every point returns an answer at a backward error of about 2.4·10⁻¹⁴, so the comparison is between two ways of getting the same thing.567891010⁴10⁵10⁶10⁷10⁸10⁹log₂ nmultiplicationsdense factorisation, n³⁄3the recursion, countedwhere the format starts payingratio at n = 642.4ratio at n = 5120.29exponent, first doubling2.2exponent, last doubling1.8backward error2.4·10⁻¹⁴cheaper is a sizenot a property

Both counted rather than estimated: the recursion carries a counter and reports what it actually did. The dense factorisation is n³/3 and rises at exactly three per doubling. The hierarchical solve rises at 2.25, 1.95, 1.78 — falling, because the cost is n log²n and its exponent is on its way to one. The two cross between n = 128 and n = 256: below it the format is the more expensive way to solve the system, at 2.36 times the dense count, and at n = 512 it is 3.4 times cheaper. Every point returns an answer at a backward error of about 2.4·10⁻¹⁴, so the comparison is between two ways of getting the same thing.

logEps: -2

The arguments are the ones The accuracy worth paying for 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.

Multiplications in a hierarchical solve and in a dense factorisation, and where they crossBoth counted rather than estimated: the recursion carries a counter and reports what it actually did. The dense factorisation is n³/3 and rises at exactly three per doubling. The hierarchical solve rises at 1.82, 1.80, 1.62 — falling, because the cost is n log²n and its exponent is on its way to one. The two cross between n = 64 and n = 64: below it the format is the more expensive way to solve the system, at 0.28 times the dense count, and at n = 512 it is 47.4 times cheaper. Every point returns an answer at a backward error of about 2.6·10⁻⁴, so the comparison is between two ways of getting the same thing.567891010³10⁴10⁵10⁶10⁷10⁸10⁹log₂ nmultiplicationsdense factorisation, n³⁄3the recursion, countedwhere the format starts payingratio at n = 640.28ratio at n = 5120.021exponent, first doubling1.8exponent, last doubling1.6backward error2.6·10⁻⁴cheaper is a sizenot a property

Both counted rather than estimated: the recursion carries a counter and reports what it actually did. The dense factorisation is n³/3 and rises at exactly three per doubling. The hierarchical solve rises at 1.82, 1.80, 1.62 — falling, because the cost is n log²n and its exponent is on its way to one. The two cross between n = 64 and n = 64: below it the format is the more expensive way to solve the system, at 0.28 times the dense count, and at n = 512 it is 47.4 times cheaper. Every point returns an answer at a backward error of about 2.6·10⁻⁴, so the comparison is between two ways of getting the same thing.

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.

9 distinct claims across 6 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.

and the answer is still an answer at n = 64 — asserted 4 times

an accuracy the blocks have singular values across

an accuracy, not a rank

LU is for square matrices

matmul shapes agree

the multiplication count grows well below the dense factorisation's cube

Against the rule

It draws a decomposition and prints its residual. It calls costAgainstSize, 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.

Neither sparse nor dense

A block nobody can call sparse

A 96 × 96 block of a kernel matrix has ninety-six nonzero singular values and five that matter. It has no zero entries, it is not described by fewer numbers than it contains, and neither of the two ways this collection already knows to make a large matrix affordable applies to it.

Where the flop count stopped predicting the time

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.

Neither sparse nor dense

A rank that is a number of digits

Ask a kernel block for two digits and it costs two columns; ask for fourteen and it costs nine. The curve is a straight line at 0.55 columns a decade, and the bound the geometry gives is a straight line too — at 3.32, which is the same shape and six times the price.

Two errors, and whose fault they are

An accuracy that is a backward error

Every backward error on this site is something an algorithm produced and somebody then measured. This one is a line in the program. Solving with a compressed matrix gives a residual that is the compression's own error, at a slope of 1.000 over ten decades, so the knob that sets the storage sets the backward error directly.

Iterating, instead of factorising

An operator with no entries

At the sizes where linear algebra is expensive the matrix does not exist. What exists is a subroutine that returns Av. Every Krylov method survives that unchanged; every algorithm that reads an entry disappears. And the derivative such a code computes is accurate to ten digits instead of sixteen, which turns out to cost nothing at all.

Randomised, and the guarantee that changes kind

Built from products alone

A 512-square hierarchical representation, at a relative error of 4·10⁻⁷, from 256 applications of an operator that is never assembled. The compression route reads 262,144 entries; this one reads none, and pays for it with a factor of seven against the representation the entries would have given.

Neither sparse nor dense

The accuracy worth paying for

Used as a preconditioner, a hierarchical representation gets better at every accuracy — the iteration count falls monotonically all the way to the tightest tolerance. The total work does not. Its minimum sits at a rank-one preconditioner on an easy problem and six decades further along on a hard one.

Elimination, and the swap

The inverse that is never formed

x = A⁻¹b is how the solution of a linear system is written and it is not how it is computed. The usual reason given is cost — three times the arithmetic. The real reason is that one of the two routes is backward stable and the other is not, and at κ = 10¹⁴ they differ by twelve orders of magnitude in the number that says whose fault a wrong answer is.

Neither sparse nor dense

The kernel with nothing to compress

Hold the geometry fixed at q = ½, fix the wavelength, and scale the picture up by sixteen. A smooth kernel needs six columns at every scale. An oscillatory one needs twelve, sixteen, twenty-two, thirty-three, fifty-three, and there is no scale at which it stops.

Where the flop count stopped predicting the time

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

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 size the rank does not notice

Sample a kernel block at 32, 64, 128 and 256 points a side and it needs five columns, five, five and five. Sample the touching block next to it at the same four sizes and it needs nine, eleven, twelve and thirteen. Same kernel, same accuracy, one number and a logarithm.

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.

Where the flop count stopped predicting the time

Where the format starts paying

A hierarchical solve costs 1.48 times a dense factorisation at 64 unknowns and 0.16 times it at 512. The crossover is between 64 and 128, it walks right when the accuracy is tightened, and the exponent between consecutive sizes is 2.13, 1.93, 1.74 — falling towards one and never arriving.

Neither sparse nor dense

Which pairs are allowed to be small

A hierarchical representation is a partition of the matrix into blocks, and the rule that produces it reads four numbers per pair of index clusters and not one entry of the matrix. On a 256-square it yields 112 blocks, 66 of them stored as two thin factors, none of rank above five.

The whole library · All essays · What must fail