Hi,

Le mardi 16 septembre 2014 09:30:23 UTC+2, Peter Bruin a écrit :
>
>
> This is probably due to Maxima.  The following happens with and without 
> the "domain: complex" setting: 
>
> Maxima 5.34.0 http://maxima.sourceforge.net 
> using Lisp ECL 12.12.1 
> Distributed under the GNU Public License. See the file COPYING. 
> Dedicated to the memory of William Schelter. 
> The function bug_report() provides bug reporting information. 
> (%i1) domain: complex; 
> (%o1)                               complex 
> (%i2) abs(sqrt(x)); 
> (%o2)                               sqrt(x) 
> (%i3) abs(1/sqrt(x)); 
>                                    !   1   ! 
> (%o3)                              !-------! 
>                                    !sqrt(x)! 
>
> I guess the first answer should be left alone (or at most changed to 
> sqrt(abs(x))) when "domain: complex" is set, which is what Sage does. 
>
> Peter 
>
>
Actually, this is not due to Maxima: with Maxima 5.29.1 shipped with Sage 
6.2, the behavior is exactly the same as the one shown above for Maxima 
5.34.0. The change is due to the interface between Sage and Maxima:

In Sage 6.2:

sage: from sage.calculus.calculus import maxima
sage: super(Expression, abs(1/sqrt(x)))._interface_(maxima)
1/sqrt(x)

while in Sage 6.3:

sage: from sage.calculus.calculus import maxima
sage: super(Expression, abs(1/sqrt(x)))._interface_(maxima)
abs(1/sqrt(_SAGE_VAR_x))

If x is complex, the change in the interface is clearly an improvement !

Eric.

-- 
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 sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to