Generator

Recovering 355/113 from its residue: nothing below 2^18, everything above

One function in the integer library, called 20 times across 6 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 6 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 recovering 355/113 from its residue: nothing below 2^18, everything above. The fraction 355/113 is reduced modulo a prime just above 2^e and then reconstructed from that one residue by the extended Euclidean algorithm. Below e = 18 the reconstruction returns a different fraction or refuses; at and above it, it returns 355/113 exactly, at every e tried. The crossover is not a property of the algorithm: a residue determines a rational uniquely once the modulus exceeds twice the square of the LARGER of the two parts, which here is 2^17.94, and below that there are two fractions with the same residue and both parts small enough. The measured first success is 2^18. There is no band in which the answer is is nearly right — the value returned below the cliff is a perfectly good fraction that is not this one.

reconstruct-cliff is one function in lib/figures/integer.js — exact arithmetic — no residual to print, and a cost measured in the length of the numbers. 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.

Recovering 355/113 from its residue: nothing below 2^18, everything aboveThe fraction 355/113 is reduced modulo a prime just above 2^e and then reconstructed from that one residue by the extended Euclidean algorithm. Below e = 18 the reconstruction returns a different fraction or refuses; at and above it, it returns 355/113 exactly, at every e tried. The crossover is not a property of the algorithm: a residue determines a rational uniquely once the modulus exceeds twice the square of the LARGER of the two parts, which here is 2^17.94, and below that there are two fractions with the same residue and both parts small enough. The measured first success is 2^18. There is no band in which the answer is is nearly right — the value returned below the cliff is a perfectly good fraction that is not this one.2^18modulus, as a power of twoa lattice with one short vectornumerator355denominator1132·max(n, d)², bits18first recovered at18moduli tried42below the bound there are two answersand the algorithm cannot prefer one

The fraction 355/113 is reduced modulo a prime just above 2^e and then reconstructed from that one residue by the extended Euclidean algorithm. Below e = 18 the reconstruction returns a different fraction or refuses; at and above it, it returns 355/113 exactly, at every e tried. The crossover is not a property of the algorithm: a residue determines a rational uniquely once the modulus exceeds twice the square of the LARGER of the two parts, which here is 2^17.94, and below that there are two fractions with the same residue and both parts small enough. The measured first success is 2^18. There is no band in which the answer is is nearly right — the value returned below the cliff is a perfectly good fraction that is not this one.

num: 355, den: 113

The arguments are the ones A basis that describes its lattice badly 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.

Recovering 355/113 from its residue: nothing below 2^18, everything aboveThe fraction 355/113 is reduced modulo a prime just above 2^e and then reconstructed from that one residue by the extended Euclidean algorithm. Below e = 18 the reconstruction returns a different fraction or refuses; at and above it, it returns 355/113 exactly, at every e tried. The crossover is not a property of the algorithm: a residue determines a rational uniquely once the modulus exceeds twice the square of the LARGER of the two parts, which here is 2^17.94, and below that there are two fractions with the same residue and both parts small enough. The measured first success is 2^18. There is no band in which the answer is is nearly right — the value returned below the cliff is a perfectly good fraction that is not this one.2^18modulus, as a power of twoa lattice with one short vectornumerator355denominator1132·max(n, d)², bits18first recovered at18moduli tried42below the bound there are two answersand the algorithm cannot prefer one

The fraction 355/113 is reduced modulo a prime just above 2^e and then reconstructed from that one residue by the extended Euclidean algorithm. Below e = 18 the reconstruction returns a different fraction or refuses; at and above it, it returns 355/113 exactly, at every e tried. The crossover is not a property of the algorithm: a residue determines a rational uniquely once the modulus exceeds twice the square of the LARGER of the two parts, which here is 2^17.94, and below that there are two fractions with the same residue and both parts small enough. The measured first success is 2^18. There is no band in which the answer is is nearly right — the value returned below the cliff is a perfectly good fraction that is not this one.

num: 1, den: 99991

The arguments are the ones A basis that describes its lattice badly 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.

Recovering 1/99991 from its residue: nothing below 2^35, everything aboveThe fraction 1/99991 is reduced modulo a prime just above 2^e and then reconstructed from that one residue by the extended Euclidean algorithm. Below e = 35 the reconstruction returns a different fraction or refuses; at and above it, it returns 1/99991 exactly, at every e tried. The crossover is not a property of the algorithm: a residue determines a rational uniquely once the modulus exceeds twice the square of the LARGER of the two parts, which here is 2^34.22, and below that there are two fractions with the same residue and both parts small enough. The measured first success is 2^35. There is no band in which the answer is is nearly right — the value returned below the cliff is a perfectly good fraction that is not this one.2^35modulus, as a power of twoa lattice with one short vectornumerator1denominator10·10⁴2·max(n, d)², bits34first recovered at35moduli tried42below the bound there are two answersand the algorithm cannot prefer one

The fraction 1/99991 is reduced modulo a prime just above 2^e and then reconstructed from that one residue by the extended Euclidean algorithm. Below e = 35 the reconstruction returns a different fraction or refuses; at and above it, it returns 1/99991 exactly, at every e tried. The crossover is not a property of the algorithm: a residue determines a rational uniquely once the modulus exceeds twice the square of the LARGER of the two parts, which here is 2^34.22, and below that there are two fractions with the same residue and both parts small enough. The measured first success is 2^35. There is no band in which the answer is is nearly right — the value returned below the cliff is a perfectly good fraction that is not this one.

num: 9973, den: 113

The arguments are the ones A basis that describes its lattice badly 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.

Recovering 9973/113 from its residue: nothing below 2^28, everything aboveThe fraction 9973/113 is reduced modulo a prime just above 2^e and then reconstructed from that one residue by the extended Euclidean algorithm. Below e = 28 the reconstruction returns a different fraction or refuses; at and above it, it returns 9973/113 exactly, at every e tried. The crossover is not a property of the algorithm: a residue determines a rational uniquely once the modulus exceeds twice the square of the LARGER of the two parts, which here is 2^27.57, and below that there are two fractions with the same residue and both parts small enough. The measured first success is 2^28. There is no band in which the answer is is nearly right — the value returned below the cliff is a perfectly good fraction that is not this one.2^28modulus, as a power of twoa lattice with one short vectornumerator9973denominator1132·max(n, d)², bits28first recovered at28moduli tried42below the bound there are two answersand the algorithm cannot prefer one

The fraction 9973/113 is reduced modulo a prime just above 2^e and then reconstructed from that one residue by the extended Euclidean algorithm. Below e = 28 the reconstruction returns a different fraction or refuses; at and above it, it returns 9973/113 exactly, at every e tried. The crossover is not a property of the algorithm: a residue determines a rational uniquely once the modulus exceeds twice the square of the LARGER of the two parts, which here is 2^27.57, and below that there are two fractions with the same residue and both parts small enough. The measured first success is 2^28. There is no band in which the answer is is nearly right — the value returned below the cliff is a perfectly good fraction that is not this one.

num: 1013, den: 29

The arguments are the ones A basis that describes its lattice badly 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.

Recovering 1013/29 from its residue: nothing below 2^21, everything aboveThe fraction 1013/29 is reduced modulo a prime just above 2^e and then reconstructed from that one residue by the extended Euclidean algorithm. Below e = 21 the reconstruction returns a different fraction or refuses; at and above it, it returns 1013/29 exactly, at every e tried. The crossover is not a property of the algorithm: a residue determines a rational uniquely once the modulus exceeds twice the square of the LARGER of the two parts, which here is 2^20.97, and below that there are two fractions with the same residue and both parts small enough. The measured first success is 2^21. There is no band in which the answer is is nearly right — the value returned below the cliff is a perfectly good fraction that is not this one.2^21modulus, as a power of twoa lattice with one short vectornumerator1013denominator292·max(n, d)², bits21first recovered at21moduli tried42below the bound there are two answersand the algorithm cannot prefer one

The fraction 1013/29 is reduced modulo a prime just above 2^e and then reconstructed from that one residue by the extended Euclidean algorithm. Below e = 21 the reconstruction returns a different fraction or refuses; at and above it, it returns 1013/29 exactly, at every e tried. The crossover is not a property of the algorithm: a residue determines a rational uniquely once the modulus exceeds twice the square of the LARGER of the two parts, which here is 2^20.97, and below that there are two fractions with the same residue and both parts small enough. The measured first success is 2^21. There is no band in which the answer is is nearly right — the value returned below the cliff is a perfectly good fraction that is not this one.

num: 355, den: 7

The arguments are the ones A fraction recovered from one remainder 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.

Recovering 355/7 from its residue: nothing below 2^18, everything aboveThe fraction 355/7 is reduced modulo a prime just above 2^e and then reconstructed from that one residue by the extended Euclidean algorithm. Below e = 18 the reconstruction returns a different fraction or refuses; at and above it, it returns 355/7 exactly, at every e tried. The crossover is not a property of the algorithm: a residue determines a rational uniquely once the modulus exceeds twice the square of the LARGER of the two parts, which here is 2^17.94, and below that there are two fractions with the same residue and both parts small enough. The measured first success is 2^18. There is no band in which the answer is is nearly right — the value returned below the cliff is a perfectly good fraction that is not this one.2^18modulus, as a power of twoa lattice with one short vectornumerator355denominator72·max(n, d)², bits18first recovered at18moduli tried42below the bound there are two answersand the algorithm cannot prefer one

The fraction 355/7 is reduced modulo a prime just above 2^e and then reconstructed from that one residue by the extended Euclidean algorithm. Below e = 18 the reconstruction returns a different fraction or refuses; at and above it, it returns 355/7 exactly, at every e tried. The crossover is not a property of the algorithm: a residue determines a rational uniquely once the modulus exceeds twice the square of the LARGER of the two parts, which here is 2^17.94, and below that there are two fractions with the same residue and both parts small enough. The measured first success is 2^18. There is no band in which the answer is is nearly right — the value returned below the cliff is a perfectly good fraction that is not this one.

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.

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

a denominator to recover

a numerator to recover

and the crossover is where the lattice bound puts it, within two bits

the assertion refuses a counterexample

the fraction is in lowest terms once its common factor is removed

the fraction is recovered once the modulus is large enough

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 214 of 397 generators — 194 print a residual and 20 are exempt with a published reason; 183 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.

Exact arithmetic, and what it costs instead

A basis that describes its lattice badly

The same set of points has infinitely many bases, they are all correct, and they are not equally useful. One measurement separates them — the product of the vectors' lengths over the lattice determinant — and the determinant is the invariant the reduction may not change, which is what makes the reduction checkable.

Exact arithmetic, and what it costs instead

A fraction recovered from one remainder

A solution over the rationals can be computed modulo a prime power and then recovered — the residue determines the fraction uniquely, but only once the modulus is twice the square of the fraction's longer part. Below that there is no partial credit: the algorithm returns a different fraction with the same residue, and it is a perfectly good one.

Exact arithmetic, and what it costs instead

A prime that divides the answer

A modular elimination reports a singular matrix and is telling the truth — over the field with p elements the matrix is singular. Over the rationals it is not. Nothing in the residue distinguishes the two cases, no quantity is small enough to be suspicious, and the wrong answer is a correct computation of a different question.

Exact arithmetic, and what it costs instead

An answer with no error in it

An integer matrix eliminated over the rationals rounds nothing, so the forward error is zero, the residual is the zero vector, and the identity this site is built on has no terms left. The cost does not vanish with the error. It moves into the length of the numbers, where three correct routes differ by four orders of magnitude.

Exact arithmetic, and what it costs instead

How many primes the answer needs

Work modulo a word-sized prime and no intermediate can exceed twenty-six bits, whatever the matrix does. The catch is that the answer must be reassembled from several such computations, and the number of them has to be fixed before the first one runs — by a theorem about how large a determinant can be, not by trying more until it settles.

Exact arithmetic, and what it costs instead

The answer is longer than the question

An exact solution of an integer system is a vector of fractions, each of them a ratio of two determinants. So the output carries 2n long integers where the input carried n² short ones, and no algorithm can write it down more cheaply — the length of the answer is a floor under every exact solver rather than a property of one.

The whole library · All essays · What must fail