On Thursday, April 9, 2015 at 5:19:54 PM UTC+2, kcrisman wrote:
>
> The following changed behaviour leads to a few fails:
>>
>> sage: a,b = var('a b')
>> sage: abs(sqrt(x))
>> sqrt(abs(x))
>> sage: sqrt(abs(x)^2)
>> sqrt(x*conjugate(x))
>> sage: abs(x)^2
>> x*conjugate(x)
>>
>
> What does Maxima do with these? I know that there has been endless
> discussion of what to do with things involving abs, square, and sqrt.
>
(%i1) abs(sqrt(x));
(%o1) sqrt(x)
(%i2) sqrt(abs(x)^2);
(%o2) abs(x)
(%i3) abs(x)^2;
2
(%o3) x
> sage: A = abs((a+I*b))^2
>> sage: A
>> (a + I*b)*(conjugate(a) - I*conjugate(b))
>> sage: A.canonicalize_radical()
>> a^2 + b^2
>>
>
> Given the history of radcan I wouldn't necessarily worry about this,
> though what the previous behavior is would be worth looking at.
>
sage: A
abs(a + I*b)^2
sage: A.canonicalize_radical()
abs(a + I*b)^2
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.