Given n points, there is exactly one polynomial of degree at most n−1 through them all — and Lagrange writes it down directly, as a blend of basis polynomials each worth 1 at its own point and 0 at the others. It is the engine behind Shamir’s secret sharing (dart 097), numerical integration, and every “connect the dots” smoothly.
For each point i build Lᵢ(x) = the product ∏(x−xⱼ)/(xᵢ−xⱼ) over the other points — it is 1 at xᵢ and 0 at every other node. The interpolant is Σ yᵢ Lᵢ(x): it hits each yᵢ because only that basis is alive there. Drag the points; the curve follows. live demo
“Lagrange’s formula, 1795” — Waring published it in 1779, and Euler in 1783; Lagrange was first third. cited
The exact same formula, over a finite field, is how Shamir’s shares (097) rebuild a secret. Waring 1779 / Lagrange 1795
Evaluating the interpolant at a target is pure f64 arithmetic — and it reproduces the underlying polynomial exactly: