By allowing the (-1)**(1/3) to remain we leave open (as with Rational 
bases) the option of getting to the real root with real_root. I wish we had 
a good mechanism to check if something like root(x, 3) + 2 == 0 when 
substituting in -8 for x. It is for this reason that the following returns 
no solution:

>>> solve(root(x,3)+2)
[]

On Tuesday, January 13, 2015 at 3:20:46 PM UTC-6, Aaron Meurer wrote:
>
> Without commenting on your proposal, I'd like to point out that point of 
> the principal nths root is that all other nth roots are the powers of that 
> root. 
>
> Aaron Meurer
>
> On Tue, Jan 13, 2015 at 3:14 PM, Chris Smith <[email protected] 
> <javascript:>> wrote:
>
>> In PR 8814 <https://github.com/sympy/sympy/pull/8814> I write, 
>>
>>
>> Something has to be done to allow one to compute real_root(float, odd) as 
>> real. At first I thought to handle this in real_root, but then I thought it 
>> might be better to catch it in _eval_power itself. Which do you think is 
>> better:
>>
>> # This is how a negative rational base behaves:
>> >>> root(S('-1/10'),3)
>> (-1)**(1/3)*10**(2/3)/10
>> # Now, for a negative float...
>> >>> root(S('-.1'),3)0.464158883361278*(-1)**(1/3)  # <-- should a negative 
>> >>> float give this (a)>>> _.n()0.232079441680639 + 0.401973384383085*I  # 
>> >>> <-- or this (b)?
>>
>> The SymPy  trend is to fully evaluate an expression if args are numbers, 
>> but by selecting the principle root in the case of Pow, the user looses the 
>> option to select the real branch post-calc. (Hence, I favor not fully 
>> evaluating in this case, selecting behavior (a).) If the power is not an 
>> odd rational, the usual, fully evaluated result is obtained.
>>
>>
>> /c
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sympy" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] <javascript:>
>> .
>> Visit this group at http://groups.google.com/group/sympy.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sympy/da5b3c19-ef67-4bcd-b5c3-b6c167bd378d%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/sympy/da5b3c19-ef67-4bcd-b5c3-b6c167bd378d%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/5dd074d2-2156-41e0-a6e0-ed6e0d3e8771%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to