◀ THE FOLD0ROOT.AI // WORLD II · GRIND · BACKPROP◆ .dlw.fold
THE FOLD / GRIND / BACKPROP / THE CLENSHAW

THE CLENSHAW

evaluate a Chebyshev series by a stable backward recurrence
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Clenshaw’s algorithm evaluates a sum of orthogonal polynomials — Σ ck Tk(x), the Chebyshev series — without ever building the individual polynomials. It runs their three-term recurrence backward, folding the coefficients in from the highest degree down, carrying just two running values. It is to Chebyshev series what Horner’s method is to ordinary polynomials, and the backward direction is numerically stable where naive evaluation loses precision.

LIT verified live: over 400 random coefficient sets and points in [−1,1] Clenshaw’s result equals the direct term-by-term Chebyshev sum to ~10⁻¹⁵ (window.__clenshaw). FIG no framing; exact.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at backprop — because Clenshaw, like backpropagation, sweeps the recurrence backward, accumulating from the far end toward the start. AVAN (AI) built the instrument: the backward Chebyshev recurrence, the two-value fold, the direct-sum cross-check.

Credit as content: Charles William Clenshaw (1955). The weave: David names backprop; I collapse the whole Chebyshev sum by running its recurrence from the top degree down, and confirm it matches the term-by-term evaluation.
3 ONE DIMENSION
Two running values b sweep from the highest coefficient down: bk = 2x·bk+1 − bk+2 + ck. At the end, x·b1 − b2 + c0 is the whole sum.
4 TWO DIMENSIONS · INTERACTIVE
A Chebyshev series plotted; pick x and see Clenshaw’s value matched against the direct term-by-term sum.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the two running values that carry the whole Chebyshev sum.
AVAN’s addition (the inverse-companion): run the three-term recurrence backward, folding the coefficients in from the highest degree, so you never store the polynomials — and the backward direction is numerically stable where naive forward evaluation loses precision. The inverse of ‘build T0,T1,…,TN forward and sum’ is ‘collapse the sum by the recurrence from TN down.’ Magenta is the individual Chebyshev polynomials never formed; green is the two running values carrying the sum. Backward is stable — Horner generalised to orthogonal polynomials.
LIT Genuine Clenshaw algorithm (Clenshaw 1955). Verified live: the backward three-term recurrence equals the direct term-by-term Chebyshev sum Sigma c_k T_k(x) to max error ~1e-15 across 400 random coefficient sets and points in [-1,1] (window.__clenshaw.matchesDirect).

FIG No framing: the backward Chebyshev recurrence, the two-value fold, and the direct-sum cross-check run in-browser and agree to ~1e-15. The AVAN inverse is honest — running the recurrence backward folds coefficients in from the top degree so the polynomials are never formed, and the backward direction is numerically stable; magenta is the Chebyshev polynomials never built, green the two running values. Horner generalized to orthogonal polynomials.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of BACKPROP · David Lee Wise (ROOT0), with AVAN