infinite speedups on xmaxima 5.9



C9) f[0]:g;
(D9)                        g
(C10) f[i]:=h(f[i-1]);
(D10)                     f  := h(f     )
                 i     i - 1
(C11) f[3];
(D11)                   h(h(h(g)))
(C12) showtime:all$
Evaluation took 0.00 seconds (0.00 elapsed)
(C13) sum(f[i],i,0,100)$
Evaluation took 1.42 seconds (1.42 elapsed)
(C14) r:%$
Evaluation took 0.00 seconds (0.00 elapsed)
(C15) r-r;
Evaluation took 1.52 seconds (1.52 elapsed)
(D15)                        0

using newsimp, the time for (c15) is reported as 0.0 seconds.

I had to make a few minor changes to run in gcl.
The revised file is now in
http://www.cs.berkeley.edu/~fateman/temp/newsimp.cl

RJF