[Maxima] Nonsimplifying nounforms: abs, realpart, carg, etc. (maxima-Bugs-902290)
macrakis at alum.mit.edu
Sun Jan 11 12:53:35 CST 2009
there has been some discussion of a bug report of mine, which I think is
worth discussing on the larger list.
The bug is that some nounforms, like realpart(1), do not simplify.
Dieter Kaiser suggests (2009-01-11 15:05):
It seems to be not difficult to extend the functions realpart and imagpart
to simplifying functions. That is the code which is necessary:...
(defun simp-realpart (x y simpflag)
(setq y (simpcheck (cadr x) simpflag))
((taylorize (mop x) (second x)))
(t (car (trisplit y)))))
...The functions work as expected as simlifying functions.
This change assumes that the simplification of a nounform is the same thing
as the evaluation of verbs. The Maxima design philosophy is quite different
from this -- please see my comment of 2007-07-14 22:24 in the bug report for
Simplification is supposed to be a relatively low-cost, local transformation
of an expression. It is *not* supposed to change the expression radically
or put it into canonical form. Thus, for example, the general simplifier
(as opposed to the CRE subsystem) does *not* perform GCDs on quotients
((x^2-1)/(x-1) remains as-is), expansions of polynomials, etc.
It is appropriate for 'cabs(-3) => 3; 'cabs(x) => abs(x) (if x is real);
etc., but NOT appropriate for 'cabs(w+z) (where w and z are complex to
Calling trisplit from the simplifying function violates this understanding
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Maxima