sqrt, abs, radcan. Re: maxima bug



On 3/16/2012 4:06 PM, Rubens Marinho wrote:
> Dear all,
>
> radcan do understand assume and do it correctly.
> consider de code
1. The radcan program does not use the assume facility. The simplification
that is done on the argument to radcan is outside the radcan program.

2. If you say   assume(z<0)
then sqrt(z^2) comes out -z.
This has nothing to do with radcan.

This is a consequence of sqrt(z^2) being simplified to abs(z), and abs(z)
simplifying to -z.

I think it is an error to simplify sqrt(z^2) to abs(z). To avoid this 
error in
the case that there are no assumptions on z, set radexpand:false.

Unfortunately this is insufficient protection against mathematical errors
in Maxima's current setup.   Sqrt(9) is {3,-3}, and if you forget it you
will get wrong answers sometimes.