Is there any reason that we should return something other than -2 for
the cube root of -8?

>>> root(-8,3)
2*(-1)**(1/3)
>>> _.n()
1.0 + 1.73205080756888*I

Of course real_root was written to work around this, but if odd powers
just removed a simple negative it wouldn't be necessary.

>>> real_root(-8,3)
-2

Note that the -1 does not always appear raised to the fractional
power:

>>> root(-8,3)
2*(-1)**(1/3)
>>> root(-9,3)
(-9)**(1/3)

When I make the change to make things like root(-8, 3) return -2, no
tests fail. Is this a change we should make?

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
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/sympy?hl=en.

Reply via email to