-- Lagrange formula for the interpolating polynomial -- of degree N passing through N points. P(x) = sum(y[k]*L(x)[k],k,1,N) L(t)[k] = m:=1, r:=1, ((r:=r*(t-x[m])/(x[k]-x[m]) when m!=k),, m:=m+1) while mēN, r -- try some points x={1,4,9,16,25,36,49,64,81,100}[:N] y={4,8,8,11,12,18,25,44,56,80} [:N] N=6 plot {x,y} plot P(X)