Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3038 by [email protected]: sign change in evalf of complex value as precision is increased
http://code.google.com/p/sympy/issues/detail?id=3038

There seems to be something strange going on with
the evaluation of these roots. Notice that the
evaluation of the 3rd and 4th roots has a sign
change when going from precision of 2 to 3,
i.e. it changes from 2 + I to 2 - I:

from sympy.polys.polyroots import roots_quartic
r = roots_quartic(Poly('x**4-6*x**3+17*x**2-26*x+20'))
for i in range(1,6):
...   print [ri.n(i) for ri in r]
...
[1.0 + 2.0*I, 1.0 - 2.0*I, 2.0 + 1.0*I, 2.0 - 1.0*I]
[1.0 + 1.7*I, 1.0 - 1.7*I, 2.0 + 1.0*I, 2.0 - 1.0*I]
[1.0 + 1.73*I, 1.0 - 1.73*I, 2.0 - 1.0*I, 2.0 + 1.0*I]
[1.0 + 1.732*I, 1.0 - 1.732*I, 2.0 - 1.0*I, 2.0 + 1.0*I]
[1.0 + 1.732*I, 1.0 - 1.732*I, 2.0 - 1.0*I, 2.0 + 1.0*I]


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

Reply via email to