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]> 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].
> 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/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/CAKgW%3D6L13CCLoDhba8ER5NPPM_rT91C7WEFNcWxX4fYQb2VXZQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to