This is the main program
converted into Maple. The conversion was done by the
OMtoMaple function (written in Maple).
Except for wrapping around a long line, the result shown
is the exact output of the converter.
macro(m=5):
macro(n=10):
x := array(1..n):
a0 := array(1..n):
a1 := array(1..n):
a2 := array(1..n):
for i to n do
x[i] := 3+2*i+i^2;
od;
MovingParabApprox(n,m,x,a0,a1,a2);
for i to n do
printf(`%2d %10.3f %10.3f %10.3f %10.3f\n`,
i,x[i],a0[i],a1[i],a2[i]);
od;
done;
done