It seems to me that the only time resimplify (which forces simp to
ignore existing simp flags) is appropriate is if you know something
has changed (assumptions, global variables, etc.) since an object was
last simplified. It is a very specialized function and should rarely
be used. The only case I can think of in the general simplifier where
it *might* be appropriate is in the simplifier for MCOND: if a>0 then
abs(a) should resimplify abs(a) with the assumption that a>0.
Otherwise, if the argument is already simplified, it should remain
untouched; if it is not simplified, the outer 'simplify' should take
care of simplifying it.
This is not innocuous. Adding resimplify's all over the code can make
the simplifier run in exponential time, if all subexpressions are
resimplified at every level. Less dramatically, an extra, unnecessary,
round of simplification was what changed the set functions from O(n)
to O(n log n) (a bug which has been fixed).
-s
On Mon, Jan 5, 2009 at 6:02 PM, Dieter Kaiser <drdieterkaiser at web.de> wrote:
> Sorry, but the complete $exp function would be of course:
>
> (defun $exp (x)
> (simplify (list '(%exp) (resimplify x))))
>
> Dieter Kaiser
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>