Generator

The roots of ∏(x − i) up to degree 20, computed from the coefficients that define them

One function in the qepscale library, called 13 times across 2 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 the roots of ∏(x − i) up to degree 20, computed from the coefficients that define them. A polynomial whose roots are the integers 1 to n, expanded exactly in BigInt and then handed to the route every library takes: the eigenvalues of the companion matrix. The measured relative error runs 1.711·10⁻¹³ at degree 6 to 0.007614 at degree 20 — the third digit of an answer whose truth is an integer. The other curve is the root condition number times the unit roundoff, which is a prediction made from the coefficients alone, and it tracks the measurement to within two orders at every degree. Above degree 19 the coefficients are integers larger than 2⁵³, so the polynomial handed to the routine is not the polynomial that was written down — the problem is damaged before any algorithm runs.

root-conditioning is one function in lib/figures/qepscale.js — the units a polynomial is written in — two lines of scaling, a prediction that is half right, and a format's edge. 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 roots of ∏(x − i) up to degree 20, computed from the coefficients that define themA polynomial whose roots are the integers 1 to n, expanded exactly in BigInt and then handed to the route every library takes: the eigenvalues of the companion matrix. The measured relative error runs 1.711·10⁻¹³ at degree 6 to 0.007614 at degree 20 — the third digit of an answer whose truth is an integer. The other curve is the root condition number times the unit roundoff, which is a prediction made from the coefficients alone, and it tracks the measurement to within two orders at every degree. Above degree 19 the coefficients are integers larger than 2⁵³, so the polynomial handed to the routine is not the polynomial that was written down — the problem is damaged before any algorithm runs.57911131517192110⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²degreerelative error of the worst rootmeasuredκ × ua polynomial is its coefficientsworst root, measured0.0076predicted, κ × u0.0023root condition number10¹³largest coefficient1.4·10¹⁹the roots are integersand the coefficients are not the roots

A polynomial whose roots are the integers 1 to n, expanded exactly in BigInt and then handed to the route every library takes: the eigenvalues of the companion matrix. The measured relative error runs 1.711·10⁻¹³ at degree 6 to 0.007614 at degree 20 — the third digit of an answer whose truth is an integer. The other curve is the root condition number times the unit roundoff, which is a prediction made from the coefficients alone, and it tracks the measurement to within two orders at every degree. Above degree 19 the coefficients are integers larger than 2⁵³, so the polynomial handed to the routine is not the polynomial that was written down — the problem is damaged before any algorithm runs.

show: "cheb-degree"

The arguments are the ones A basis that has to know where the roots are passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The worst relative error in the roots of a degree-n polynomial, computed from its rounded monomial coefficients by the companion matrix and from its rounded Chebyshev coefficients by the colleague matrix, with roots at the integers 1 to n and at the Chebyshev points of [1, n]monomial, integers: 1.7·10⁻¹³ at 6, 1.1·10⁻¹⁰ at 10, 7.2·10⁻⁷ at 14, 7.2·10⁻⁴ at 18, 0.0076 at 20, 0.16 at 24, 0.21 at 28, 0.19 at 32, 1 at 40. monomial, Chebyshev points: 2.5·10⁻¹³ at 6, 1.5·10⁻¹⁰ at 10, 2.4·10⁻⁸ at 14, 1.8·10⁻⁵ at 18, 0.0042 at 20, 0.048 at 24, 0.064 at 28, 0.13 at 32, 1 at 40. Chebyshev, integers: 1.3·10⁻¹⁵ at 6, 1.8·10⁻¹⁴ at 10, 1.2·10⁻¹⁴ at 14, 2.4·10⁻¹³ at 18, 4.4·10⁻¹³ at 20, 5.8·10⁻¹¹ at 24, 1.6·10⁻⁹ at 28, 6.8·10⁻⁸ at 32, 2.8·10⁻⁴ at 40. Chebyshev, Chebyshev points: 4.1·10⁻¹⁵ at 6, 8.4·10⁻¹⁵ at 10, 10⁻¹⁴ at 14, 1.9·10⁻¹⁴ at 18, 2.6·10⁻¹⁴ at 20, 1.9·10⁻¹⁴ at 24, 2.7·10⁻¹⁴ at 28, 8.7·10⁻¹⁴ at 32, 9.1·10⁻¹⁴ at 40. At degree twenty on the integers the Chebyshev route is 1.7·10¹⁰ times more accurate.612182430364210⁻¹⁶10⁻¹⁴10⁻¹²10⁻¹⁰10⁻⁸10⁻⁶10⁻⁴10⁻²1degree nworst relative root errormonomial, integersmonomial, Chebyshev pointsChebyshev, integersChebyshev, Chebyshev pointsred: monomial; blue and green: Chebyshevthe basis has to match the roots

monomial, integers: 1.7·10⁻¹³ at 6, 1.1·10⁻¹⁰ at 10, 7.2·10⁻⁷ at 14, 7.2·10⁻⁴ at 18, 0.0076 at 20, 0.16 at 24, 0.21 at 28, 0.19 at 32, 1 at 40. monomial, Chebyshev points: 2.5·10⁻¹³ at 6, 1.5·10⁻¹⁰ at 10, 2.4·10⁻⁸ at 14, 1.8·10⁻⁵ at 18, 0.0042 at 20, 0.048 at 24, 0.064 at 28, 0.13 at 32, 1 at 40. Chebyshev, integers: 1.3·10⁻¹⁵ at 6, 1.8·10⁻¹⁴ at 10, 1.2·10⁻¹⁴ at 14, 2.4·10⁻¹³ at 18, 4.4·10⁻¹³ at 20, 5.8·10⁻¹¹ at 24, 1.6·10⁻⁹ at 28, 6.8·10⁻⁸ at 32, 2.8·10⁻⁴ at 40. Chebyshev, Chebyshev points: 4.1·10⁻¹⁵ at 6, 8.4·10⁻¹⁵ at 10, 10⁻¹⁴ at 14, 1.9·10⁻¹⁴ at 18, 2.6·10⁻¹⁴ at 20, 1.9·10⁻¹⁴ at 24, 2.7·10⁻¹⁴ at 28, 8.7·10⁻¹⁴ at 32, 9.1·10⁻¹⁴ at 40. At degree twenty on the integers the Chebyshev route is 1.7·10¹⁰ times more accurate.

show: "cheb-wiggle", n: 20

The arguments are the ones A basis that has to know where the roots are passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

|p(x)| along [1, 20], scaled to its largest value, for the polynomial with roots at the integers 1 to 20 and for the one with roots at the Chebyshev points of the same intervalWith integer roots the polynomial's humps between neighbouring roots fall from 1 at the ends of the interval to about 3.8·10⁻⁵ in the middle. With roots at Chebyshev points every hump reaches the same height. A root's sensitivity to the coefficients goes like the polynomial's largest value over its slope at the root, so the middle integer roots are the sensitive ones.degree 20integer roots, middle hump3.8·10⁻⁵Chebyshev points, every hump1246810121416182010⁻¹⁴10⁻¹²10⁻¹⁰10⁻⁸10⁻⁶10⁻⁴10⁻²1x|p(x)| ÷ its largest valueblue: integer roots; green: Chebyshev pointsthe middle of an equispaced polynomial is small

With integer roots the polynomial's humps between neighbouring roots fall from 1 at the ends of the interval to about 3.8·10⁻⁵ in the middle. With roots at Chebyshev points every hump reaches the same height. A root's sensitivity to the coefficients goes like the polynomial's largest value over its slope at the root, so the middle integer roots are the sensitive ones.

show: "cheb-perroot"

The arguments are the ones A basis that has to know where the roots are passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

Each root's relative error: the Chebyshev route at degree thirty and the monomial route at degree sixteen, roots at the integersChebyshev route, degree 30: 7.8·10⁻¹⁴, 10⁻¹³, 7.8·10⁻¹³, 1.9·10⁻¹², 1.9·10⁻¹¹, 2.6·10⁻¹¹, 9.8·10⁻¹², 4.2·10⁻¹⁰, 1.8·10⁻⁹, 3.7·10⁻⁹, 6.3·10⁻⁹, 1.1·10⁻⁸, 1.9·10⁻⁸, 2.6·10⁻⁸, 3·10⁻⁸, 2.8·10⁻⁸, 2.2·10⁻⁸, 1.4·10⁻⁸, 7.2·10⁻⁹, 3.5·10⁻⁹, 1.7·10⁻⁹, 7.2·10⁻¹⁰, 1.5·10⁻¹⁰, 2.9·10⁻¹², 6.3·10⁻¹², 3.6·10⁻¹², 2.8·10⁻¹³, 8.3·10⁻¹⁴, 7.2·10⁻¹⁵, 2.6·10⁻¹⁵. Monomial route, degree 16: 10⁻¹³, 1.2·10⁻¹¹, 3.4·10⁻¹⁰, 4.6·10⁻⁹, 3.5·10⁻⁸, 1.7·10⁻⁷, 5.3·10⁻⁷, 1.1·10⁻⁶, 1.5·10⁻⁶, 1.1·10⁻⁶, 2.5·10⁻⁷, 4·10⁻⁷, 4.3·10⁻⁷, 1.8·10⁻⁷, 2.9·10⁻⁸, 2.2·10⁻¹⁰. Both are worst near the middle of the interval and best at its ends.5101520253010⁻¹⁶10⁻¹⁴10⁻¹²10⁻¹⁰10⁻⁸10⁻⁶rootrelative errorChebyshev route, n = 30monomial route, n = 16the hard roots are in the middleends easy, middle hard, in either basis

Chebyshev route, degree 30: 7.8·10⁻¹⁴, 10⁻¹³, 7.8·10⁻¹³, 1.9·10⁻¹², 1.9·10⁻¹¹, 2.6·10⁻¹¹, 9.8·10⁻¹², 4.2·10⁻¹⁰, 1.8·10⁻⁹, 3.7·10⁻⁹, 6.3·10⁻⁹, 1.1·10⁻⁸, 1.9·10⁻⁸, 2.6·10⁻⁸, 3·10⁻⁸, 2.8·10⁻⁸, 2.2·10⁻⁸, 1.4·10⁻⁸, 7.2·10⁻⁹, 3.5·10⁻⁹, 1.7·10⁻⁹, 7.2·10⁻¹⁰, 1.5·10⁻¹⁰, 2.9·10⁻¹², 6.3·10⁻¹², 3.6·10⁻¹², 2.8·10⁻¹³, 8.3·10⁻¹⁴, 7.2·10⁻¹⁵, 2.6·10⁻¹⁵. Monomial route, degree 16: 10⁻¹³, 1.2·10⁻¹¹, 3.4·10⁻¹⁰, 4.6·10⁻⁹, 3.5·10⁻⁸, 1.7·10⁻⁷, 5.3·10⁻⁷, 1.1·10⁻⁶, 1.5·10⁻⁶, 1.1·10⁻⁶, 2.5·10⁻⁷, 4·10⁻⁷, 4.3·10⁻⁷, 1.8·10⁻⁷, 2.9·10⁻⁸, 2.2·10⁻¹⁰. Both are worst near the middle of the interval and best at its ends.

show: "cheb-coeffs"

The arguments are the ones A basis that has to know where the roots are passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

The size of each Chebyshev coefficient against the leading one, at degree thirty, for roots at the integers and at Chebyshev pointsInteger roots: the largest ratio is 1329, at k = 2. Chebyshev points: 0.002 at most below the leading term — the polynomial is the leading term to within the 1/1024 grid the roots were rounded to.05101520253010⁻¹²10⁻⁹10⁻⁶10⁻³110³10⁶k|cₖ| ÷ |cₙ|integer rootsChebyshev pointsodd coefficients are zero by symmetry and not drawna small leading term is a large last row

Integer roots: the largest ratio is 1329, at k = 2. Chebyshev points: 0.002 at most below the leading term — the polynomial is the leading term to within the 1/1024 grid the roots were rounded to.

show: "cheb-factors"

The arguments are the ones A basis that has to know where the roots are passes. A value nobody placed would be a picture no essay asked for and no claim was ever checked against.

For roots at the integers, the colleague-matrix route's error against degree, beside the two factors that account for it: the roots' normwise sensitivity to the Chebyshev coefficients times u, and the ratio of the coefficients' largest to the leading onen = 6: error 1.3·10⁻¹⁵, κu 6.6·10⁻¹⁷, the coefficient norm over the leading coefficient 1, product 6.6·10⁻¹⁷; n = 10: error 1.8·10⁻¹⁴, κu 4.2·10⁻¹⁶, the coefficient norm over the leading coefficient 2.2, product 9·10⁻¹⁶; n = 14: error 1.2·10⁻¹⁴, κu 3.7·10⁻¹⁵, the coefficient norm over the leading coefficient 6.9, product 2.5·10⁻¹⁴; n = 18: error 2.4·10⁻¹³, κu 3.8·10⁻¹⁴, the coefficient norm over the leading coefficient 24, product 9.1·10⁻¹³; n = 20: error 4.4·10⁻¹³, κu 1.3·10⁻¹³, the coefficient norm over the leading coefficient 46, product 5.8·10⁻¹²; n = 24: error 5.8·10⁻¹¹, κu 1.5·10⁻¹², the coefficient norm over the leading coefficient 172, product 2.5·10⁻¹⁰; n = 28: error 1.6·10⁻⁹, κu 1.8·10⁻¹¹, the coefficient norm over the leading coefficient 668, product 1.2·10⁻⁸; n = 32: error 6.8·10⁻⁸, κu 2.3·10⁻¹⁰, the coefficient norm over the leading coefficient 2659, product 6.2·10⁻⁷; n = 40: error 2.8·10⁻⁴, κu 4·10⁻⁸, the coefficient norm over the leading coefficient 4.4·10⁴, product 0.0018. From degree 14 the error is 0.08 to 0.46 times the product.612182430364210⁻¹⁸10⁻¹⁵10⁻¹²10⁻⁹10⁻⁶10⁻³110³degree nsizemeasured errorκu × ‖c‖/|cₙ|κu, normwise‖c‖/|cₙ|both factors grow exponentially for equispaced rootsthe conditioning and the route both cost

n = 6: error 1.3·10⁻¹⁵, κu 6.6·10⁻¹⁷, the coefficient norm over the leading coefficient 1, product 6.6·10⁻¹⁷; n = 10: error 1.8·10⁻¹⁴, κu 4.2·10⁻¹⁶, the coefficient norm over the leading coefficient 2.2, product 9·10⁻¹⁶; n = 14: error 1.2·10⁻¹⁴, κu 3.7·10⁻¹⁵, the coefficient norm over the leading coefficient 6.9, product 2.5·10⁻¹⁴; n = 18: error 2.4·10⁻¹³, κu 3.8·10⁻¹⁴, the coefficient norm over the leading coefficient 24, product 9.1·10⁻¹³; n = 20: error 4.4·10⁻¹³, κu 1.3·10⁻¹³, the coefficient norm over the leading coefficient 46, product 5.8·10⁻¹²; n = 24: error 5.8·10⁻¹¹, κu 1.5·10⁻¹², the coefficient norm over the leading coefficient 172, product 2.5·10⁻¹⁰; n = 28: error 1.6·10⁻⁹, κu 1.8·10⁻¹¹, the coefficient norm over the leading coefficient 668, product 1.2·10⁻⁸; n = 32: error 6.8·10⁻⁸, κu 2.3·10⁻¹⁰, the coefficient norm over the leading coefficient 2659, product 6.2·10⁻⁷; n = 40: error 2.8·10⁻⁴, κu 4·10⁻⁸, the coefficient norm over the leading coefficient 4.4·10⁴, product 0.0018. From degree 14 the error is 0.08 to 0.46 times the product.

What it checked while drawing

Every figure above checked its own claims on the way to being drawn, and a claim that failed would have stopped the picture rather than shipped a wrong one. Those checks 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 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 degree the dial offers

a degree the exact expansion can afford

a degree the exact expansion can be read at

a leading coefficient that is not zero

a size the exact expansion can be read at

matmul shapes agree

the measured error is the condition number times the unit roundoff

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 217 of 397 generators — 199 print a residual and 18 are exempt with a published reason; 180 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