◄ WORLD V · SONNY 5DART 297 · a helldive at the net

BARYCENTRIC INTERPOLATION the fast, stable form — precompute the weights, reconstruct in one pass

The Lagrange form is elegant but slow and unstable; barycentric interpolation is its rehabilitation. Precompute one weight per node, wj = 1/∏k≠j(xj−xk), and then the interpolant at any point is a single quotient: p(x) = [Σ wj yj/(x−xj)] / [Σ wj/(x−xj)]. Adding a new node costs an O(n) weight update, not a refit; evaluation is O(n) and numerically stable even for hundreds of points (Berrut & Trefethen). It is the form real software uses to reconstruct a function from samples — the same value as Newton and Neville, computed as a ratio of weighted contributions.

THE TECHNIQUE weights wj, then one quotient reconstructs any value

The same three samples. The demo precomputes the barycentric weights and reconstructs the value as one weighted quotient: live demo


HISTORY & CREDIT Henrici · Berrut-Trefethen 2004

“Lagrange interpolation is O(n²) and unstable.” — the barycentric form makes it O(n) and stable: the weights carry the geometry once, and every evaluation is a clean quotient. The classic formula, rehabilitated. cited

lineage · the true barycentric formula (Taylor, Dupuy; Henrici) — Lagrange interpolation rewritten as weighted quotients.
2004 · Berrut & Trefethen — “Barycentric Lagrange Interpolation”: the survey that made it the default.
now · the standard evaluation form (Chebfun and every serious interpolation library).

The weights are the Vandermonde geometry, precomputed; every reconstruction after is one quotient. Fast, stable, and exact where the nodes are distinct. Berrut-Trefethen 2004

RECOMMEND FOR I-13 weighted-quotient reconstruction, computed

On the canonical compiler, weights 0.5, −1, 0.5 reconstruct the value to 19 at x=3 (to f64 precision) — the same value as Newton and Neville:

$ i13 run rec_barycentric.i13 # weights, then one quotient w0 = 0.5 w1 = -1 w2 = 0.5 recon = 19.000000000000007 -- same value, computed as a weighted ratio
Recommend: barycentric is the third road to the same reconstruction, and the one i13 would actually use. Its weights 0.5, −1, 0.5 are built from the pairwise node gaps — the very factors of the Vandermonde determinant (dart 294) — and the value falls out as one quotient: 19 to the last f64 digit. That three algorithms (Newton, Neville, barycentric) recover the identical polynomial value is not a coincidence; it is the uniqueness the load-bearing structure guarantees. Reconstruction is caused by that structure, and here i13 computes it the fast way.