[Maxima] Simpgamma has two efficiency hacks

Dieter Kaiser drdieterkaiser at web.de
Mon Sep 29 09:35:14 CDT 2008


Doing some work on simpgamma, I have seen that we have two efficiency hacks in
the code which bypass the simplifier. The code used is:

(simpfact (list '(mfactorial) (1- j)) 1 nil)
(simpabs (list '(%abs) j) 1 t)

This could be replaced by:

(simplify (list '(mfactorial) (1- j)))
(simplify (list '(mabs) j))

 or (simplifya (list '(mabs) j) t)

In the last expression j is assumed to be a simplified Maxima rational. So, to
gain some extra efficiency the simpflag was set to T. But this test the
simplifer can do too.

What do you think? Should we make the code more robust and avoid to bypass the
simplifier?

Dieter Kaiser



More information about the Maxima mailing list