On Jan 23, 8:26 pm, "Ted Kosan" <[EMAIL PROTECTED]> 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?
>
> Ted

What's interesting here is that the output of the cube root of -1 is
not -1, but the "first clockwise" root from 1+0i, or the usual choice
for a primitive sixth root of unity.  But what Ted really wanted was
just the real cube root of -1.

What is the "desired" output here by the developers?  Or is this
Python-internal?  Boy, I can really think of times I would want either
output without having to specify real or complex, and I suppose
sometimes one might want a list of all three roots.

- kcrisman
--~--~---------~--~----~------------~-------~--~----~
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