drdieterkaiser at web.de
Sun Nov 1 17:42:21 CST 2009
Am Sonntag, den 01.11.2009, 16:25 -0700 schrieb Robert Dodier:
> > declare(z,complex)$
> > cabs(z+1) => sqrt(realpart(z)+1)^2+imagpart(z)^2)
> > which is as expected. But abs(z+1) does the same thing, which it did not
> > used to. So there is now no way to express the concept of "the absolute
> > value of z" without writing it out in terms of real/imaginary components,
> > which is horrible.
> Yes, that seems bad. Typically, though, stuff gets changed because
> of some other problem, of which we have now lost sight ...
> I guess if we trawl through the CVS history we could discover
> why it was changed?
This example has changed of course, because abs tries to look more
carefully for complex expressions. In earlier versions of Maxima cabs is
called from abs only if we have the symbol %i within the expression. Now
abs looks for complex symbols too to get a lot of other things more
The above problem is the reason, I hesitated to introduce not only
support for complex symbols, but complex functions too.
All this might be a dilemma. I often thought about the code for complex
expressions. Perhaps it is necessary to start from the very beginning
and define what the code should really do to handle complex expressions.
More information about the Maxima