The roots of ∏(x − i) up to degree 20, computed from the coefficients that define them
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.
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.
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.
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.
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.
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.
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.
A basis that has to know where the roots are
Wilkinson's polynomial loses its roots in the third figure at degree twenty when they are computed from its monomial coefficients, and the repair offered was to change the basis: in Chebyshev coefficients, with the colleague matrix, the conditioning 'does not degrade exponentially with degree'. Expanded exactly in that basis and rounded once, the integers' roots come back ten orders better at degree twenty — 4.4·10⁻¹³ against 7.6·10⁻³ — and still degrade exponentially, at a third of a decade a degree, to 2.8·10⁻⁴ at forty. Place the same number of roots at the interval's Chebyshev points instead and they stay at 10⁻¹⁴ at every degree, while the monomial route loses them as fast as the integers. The basis does not repair the problem; it has to match where the roots are.
Two errors, and whose fault they areThe roots are not the coefficients
A polynomial whose roots are the integers one to twenty, expanded exactly, handed to the routine every library uses. The computed roots are wrong in the third digit, the computation is backward stable for the matrix it factorised, and above degree eighteen the coefficients are not double-precision numbers at all.