On Jan 23, 2008, at 5:26 PM, Ted Kosan wrote:

>
> Mike wrote:
>
>> It is due to the fact that ^ has a higher precedence than - in  
>> Python.
>> n(-1^(1/3)) is the same as n((-1^(1/3))).
>
> Okay, here is how I ran into this:
>
>     https://sage.ssu.portsmouth.oh.us:9000/home/pub/21/
>
> What I expected to get was -1.44224957030741.  Which result should  
> it produce?

As MikeH noted, it's dictated by Python's precedence rules: the  
"phrase" '-1^(1/3)' is by definition interpreted to mean '-(1^ 
(1/3))', which is '-1'.  Unless you can somehow finagle Sage into  
producing a cube root of unity from '1' :-}

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income
--------
Experience is what you get
   when you don't get what you want.
--------




--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to