On Jan 23, 2008 5:50 PM, kcrisman <[EMAIL PROTECTED]> wrote: > > > > 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.
Until a month ago (-1)^(1/3) would have given -1. This is the default behavior dictated by Maxima. Then Paul Zimmerman complained (with a great argument) that this was stupid, and Mike Hansen changed the default Maxima behavior to what we currently have. He did this by setting a variable when the symbolic arithmetic class starts maxima. http://trac.sagemath.org/sage_trac/ticket/1425 If you saw Paul Zimmerman's talk at Sage Days 6, you get the very strong impression that he's right about anything like this. -- William --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---