Am Samstag, den 31.10.2009, 22:44 +0100 schrieb Adam Majewski:
> Hi,
>
> What is a difference between abs and cabs ?
> (abs can handle complex values)
> When use abs, when cabs ?
In short:
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.
E.g.
(%i2) declare(z,complex)$
For this case the simplifying abs function returns an unsimplified
expressions:
(%i3) abs(log(z));
(%o3) abs(log(z))
The verb function cabs calculates the following answer:
(%i4) cabs(log(z));
(%o4) sqrt(log(abs(z))^2+carg(z)^2)
Dieter Kaiser