Polynomial interpolation by I., S.

{if(NF<5){for(i=o=0;i++<9;o=o" "s){n=1+NF;for(s=0;--n;s*=i)s+=$n}$0=o}else{{o=c=_
for(n=NF;N=n--;){for(s=R=0;N>r=R++;f=r?f*r:1){for(C=d=1;d<R;C/=d++)C*=N-d
s=C*($R-=c*R^N)-s}o=(c=s/f)" "o}$0=o}}}sub(/^0 /,_)+sub(/ (0 )+$/,_)

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page