Polynomial interpolation by nfouille

set 96 -72 32 -6 -104 114 -56 11 36 -48 28 -6 -4 6 -4 1
for ij in {1..4}{1..4};do eval A$ij=$1;shift;done
while read l;set -- $l;(($#>0));do for i in {1..9};do a=0;b=0;for f
do x=A$i$((++b));a="$a+$f*"$(($#>4?${!x:-0}:24*i**b));done
printf %f\  `bc -l<<<"($a)"/24`;done;echo
done|sed 's/0000*//g;s/\. / /g;s/\.$//;s/\( 0\)* $//'

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

download

return to the top page