I noticed this in Student:-NumericalAnalysis:-Romberg, here are the lines of interest:

The question is: Why create rtable, apply algorithm, then convert to Matrix at end? Why not replace line 4 below with Matrix command from start? Could not the same thing be done using Matrix from the start?

-----------------------------------------

proc(expr, var, a, b, n)

local f, R, j, k, i, oldDigits;

4 R := rtable(1 .. n,1 .. n,('storage') = ('triangular')['lower']); #Why not create Matrix here?

6 R[1,1] := evalf(1/2*(b-a)*(f(a)+f(b)));

7 for k from 2 to n do

8 R[k,1] := 1/2*evalf(R[k-1,1]+(b-a)/(2^(k-2))*add(f(a+(2*i-1)*(b-a)/(2^(k-1))),i = 1 .. 2^(k-2)))

end do;

10 for j from 2 to n do

11 for k from j to n do

12 R[k,j] := evalf(4^(j-1)*R[k,j-1]-R[k-1,j-1])/(4^(j-1)-1)

end do

end do;

13 R := evalf[oldDigits](R);

14 return convert(R,Matrix,('shape') = ('triangular')['lower']) #Why not use Matrix from the start?

end proc

------------------------------------------

Maple 18.02