As Dieter says, abs is a simplifying function, and cabs is a routine.
The distinction is that abs is for when you want to *express* the concept of
absolute value; cabs is for when you want to *change the form* of the
expression to make it more explicit. This is similar to the noun/verb forms
of integrate/limit/diff: 'integrate is to integrate as abs is to cabs. The
consistent solution would be to change over to 'abs/abs.
Somewhere along the line (post-Maxima 5.9), the two concepts seem to have
gotten mixed up.
For example,
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.
-s
On Sun, Nov 1, 2009 at 1:36 PM, Robert Dodier <robert.dodier at gmail.com>wrote:
> On 10/31/09, Dieter Kaiser <drdieterkaiser at web.de> wrote:
>
> > The abs function is a simplifying function, which calls cabs, when the
> > argument seems to be complex. That is not perfectly implemented. More
> > work can be done.
> >
> > The cabs function is a verb function, which assumes a complex argument.
> > Therefore the argument is always split into a real and imaginary part.
>
> Hmm. Does this suggest that cabs should be hidden from the user,
> and only called from abs as necessary?
>
> I've often wondered about abs vs cabs myself ....
>
> best
>
> Robert Dodier
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>