compilation of tail recursive functions



hello volker,

is it possible to detect tail recursion in the maxima expression
so that the maxima translator can help the lisp compiler see it?

the call to SIMPLIFY is there because maxima simplifies
function call return values. maybe the translator can change
(SIMPLIFY (MFUNCTION-CALL FOO ...)) into
(MFUNCTION-CALL FOO-SIMPLIFY-COMPOSITION ...)
inventing a function which exists just to do
(SIMPLIFY (MFUNCTION-CALL FOO ...)). can that help the lisp compiler?

it is possible that tail recursion is not considered by the maxima
translator (i didn't look at the code). if you have some ideas about
that, i would be interested to hear it.

best,
robert