On Sun, Jan 18, 2009 at 10:07 AM, Robert Dodier <[email protected]> wrote:
>
> William Stein wrote:
>
>> sage: a = 7-(-1)^(1/3)
>> sage: latex(a._maxima_())
>> 7-\left(-1\right)^{{{1}\over{3}}}
>>
>> Don't use maxima(a), since then you'll get a in a session of maxima
>> that has different defaults than the calculus module uses, in
>> particular, roots are always assumed real, which may be bad (though
>> maybe ok for economists):
>>
>> sage: a = 7-(-1)^(1/3)
>> sage: latex(maxima(a))
>> 8
>
> FWIW in Maxima domain:complex prevents simplification of (-1)^(1/3).
Thanks for mentioning this. The "different defaults" I was mentioning above
include setting domain:complex in the Maxima used for Sage calculus, since
Paul Zimmerman convinced us we should.
William
>
> domain : complex;
> 7 - (- 1)^(1/3);
> => 7-(-1)^(1/3)
> tex (%);
> => $$7-\left(-1\right)^{{{1}\over{3}}}$$
>
> Without reading the code I don't know the full extent of the wonders
> wrought by domain:complex.
>
> Robert Dodier
>
> >
>
--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---