Status: Accepted
Owner: [email protected]
Labels: Type-Defect Priority-Medium
New issue 2362 by [email protected]: subs or N has an issue with quartic root
http://code.google.com/p/sympy/issues/detail?id=2362
The following are the cse form of the roots obtained as the solution of eq
followed by eq.subs(u, r).n() for each of those roots, r.
eq = u**4 - 3*u + 4
([(x0, 9/16 + I*42591**(1/2)/144), (x1, 8/(3*x0**(1/3)) +
2*x0**(1/3))], [x1**(1
/2)/2 - (-x1 + 6/x1**(1/2))**(1/2)/2])
-.0e-128 + .0e-129*I
([(x0, 9/16 + I*42591**(1/2)/144), (x1, 2*x0**(1/3)), (x2,
8/(3*x0**(1/3))), (x3
, x1 + x2)], [(-x3 - 6/x3**(1/2))**(1/2)/2 - x3**(1/2)/2])
.0e-126 + .0e-134*I
([(x0, 9/16 + I*42591**(1/2)/144), (x1, 8/(3*x0**(1/3)) +
2*x0**(1/3))], [x1**(1
/2)/2 + (-x1 + 6/x1**(1/2))**(1/2)/2])
.0e-129 + .0e-129*I
([(x0, 9/16 + I*42591**(1/2)/144), (x1, 2*x0**(1/3)), (x2,
8/(3*x0**(1/3))), (x3
, x1 + x2)], [-x3**(1/2)/2 - (-x3 - 6/x3**(1/2))**(1/2)/2])
.0e-90 + 8.02995128223089*I
^__OOPS! What happened here?
Substitution of the last root results in something that is far from zero.
And this problem has existed for some time in master though I was not able
to locate the exact point since older commits don't allow me to start sympy
in 2.6 (there are complaints about imports).
If you do eq.subs(u, r.n()).n() all answers are 0, so the roots are
correct. The problem lies elsewhere.
--
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.