Comment #8 on issue 1158 by Vinzent.Steinberg: regression: roots of polys
http://code.google.com/p/sympy/issues/detail?id=1158
Is this fixed?
>>> p = x**4 - 6*x**3 - 21*x**2 + 118*x + 216
>>> roots(p,x,quartics=True)
{3/2 + 1/2*(46 - (-968 + 2292/(1/2 + I*3**(1/2)/2) + 2292/(1/2 -
I*3**(1/2)/2) +
328329/(14077 + 2*2507353**(1/2))**(2/3) + 328329/((1/2 +
I*3**(1/2)/2)**2*(14077 +
2*2507353**(1/2))**(2/3)) + 328329/((1/2 - I*3**(1/2)/2)**2*(14077 +
2*2507353**(1/2))**(2/3)) + 656658/((1/2 + I*3**(1/2)/2)*(14077 +
2*2507353**(1/2))**(2/3)) + 656658/((1/2 - I*3**(1/2)/2)*(14077 +
2*2507353**(1/2))**(2/3)) + 656658/((1/2 + I*3**(1/2)/2)*(1/2 -
I*3**(1/2)/2)*(14077
+ 2*2507353**(1/2))**(2/3)) - 16044/(14077 + 2*2507353**(1/2))**(1/3) -
16044/((1/2 +
I*3**(1/2)/2)*(14077 + 2*2507353**(1/2))**(1/3)) - 16044/((1/2 -
I*3**(1/2)/2)*(14077
+ 2*2507353**(1/2))**(1/3)) - 56*(14077 + 2*2507353**(1/2))**(1/3) +
4*(14077 +
2*2507353**(1/2))**(2/3))**(1/2) + 3*(92 + 2292/(14077 +
2*2507353**(1/2))**(1/3) +
4*(14077 + 2*2507353**(1/2))**(1/3))**(1/2) - 573/((1/2 +
I*3**(1/2)/2)*(14077 +
2*2507353**(1/2))**(1/3)) - 573/((1/2 - I*3**(1/2)/2)*(14077 +
2*2507353**(1/2))**(1/3)) - (14077 + 2*2507353**(1/2))**(1/3))**(1/2) +
1/4*(92 +
2292/(14077 + 2*2507353**(1/2))**(1/3) + 4*(14077 +
2*2507353**(1/2))**(1/3))**(1/2):
1, 3/2 + 1/2*(46 + (-968 + 2292/(1/2 + I*3**(1/2)/2) + 2292/(1/2 -
I*3**(1/2)/2) +
328329/(14077 + 2*2507353**(1/2))**(2/3) + 328329/((1/2 +
I*3**(1/2)/2)**2*(14077 +
2*2507353**(1/2))**(2/3)) + 328329/((1/2 - I*3**(1/2)/2)**2*(14077 +
2*2507353**(1/2))**(2/3)) + 656658/((1/2 + I*3**(1/2)/2)*(14077 +
2*2507353**(1/2))**(2/3)) + 656658/((1/2 - I*3**(1/2)/2)*(14077 +
2*2507353**(1/2))**(2/3)) + 656658/((1/2 + I*3**(1/2)/2)*(1/2 -
I*3**(1/2)/2)*(14077
+ 2*2507353**(1/2))**(2/3)) - 16044/(14077 + 2*2507353**(1/2))**(1/3) -
16044/((1/2 +
I*3**(1/2)/2)*(14077 + 2*2507353**(1/2))**(1/3)) - 16044/((1/2 -
I*3**(1/2)/2)*(14077
+ 2*2507353**(1/2))**(1/3)) - 56*(14077 + 2*2507353**(1/2))**(1/3) +
4*(14077 +
2*2507353**(1/2))**(2/3))**(1/2) - 3*(92 + 2292/(14077 +
2*2507353**(1/2))**(1/3) +
4*(14077 + 2*2507353**(1/2))**(1/3))**(1/2) - 573/((1/2 +
I*3**(1/2)/2)*(14077 +
2*2507353**(1/2))**(1/3)) - 573/((1/2 - I*3**(1/2)/2)*(14077 +
2*2507353**(1/2))**(1/3)) - (14077 + 2*2507353**(1/2))**(1/3))**(1/2) -
1/4*(92 +
2292/(14077 + 2*2507353**(1/2))**(1/3) + 4*(14077 +
2*2507353**(1/2))**(1/3))**(1/2):
1, 3/2 - 1/2*(46 + (-968 + 2292/(1/2 + I*3**(1/2)/2) + 2292/(1/2 -
I*3**(1/2)/2) +
328329/(14077 + 2*2507353**(1/2))**(2/3) + 328329/((1/2 +
I*3**(1/2)/2)**2*(14077 +
2*2507353**(1/2))**(2/3)) + 328329/((1/2 - I*3**(1/2)/2)**2*(14077 +
2*2507353**(1/2))**(2/3)) + 656658/((1/2 + I*3**(1/2)/2)*(14077 +
2*2507353**(1/2))**(2/3)) + 656658/((1/2 - I*3**(1/2)/2)*(14077 +
2*2507353**(1/2))**(2/3)) + 656658/((1/2 + I*3**(1/2)/2)*(1/2 -
I*3**(1/2)/2)*(14077
+ 2*2507353**(1/2))**(2/3)) - 16044/(14077 + 2*2507353**(1/2))**(1/3) -
16044/((1/2 +
I*3**(1/2)/2)*(14077 + 2*2507353**(1/2))**(1/3)) - 16044/((1/2 -
I*3**(1/2)/2)*(14077
+ 2*2507353**(1/2))**(1/3)) - 56*(14077 + 2*2507353**(1/2))**(1/3) +
4*(14077 +
2*2507353**(1/2))**(2/3))**(1/2) - 3*(92 + 2292/(14077 +
2*2507353**(1/2))**(1/3) +
4*(14077 + 2*2507353**(1/2))**(1/3))**(1/2) - 573/((1/2 +
I*3**(1/2)/2)*(14077 +
2*2507353**(1/2))**(1/3)) - 573/((1/2 - I*3**(1/2)/2)*(14077 +
2*2507353**(1/2))**(1/3)) - (14077 + 2*2507353**(1/2))**(1/3))**(1/2) -
1/4*(92 +
2292/(14077 + 2*2507353**(1/2))**(1/3) + 4*(14077 +
2*2507353**(1/2))**(1/3))**(1/2):
1, 3/2 - 1/2*(46 - (-968 + 2292/(1/2 + I*3**(1/2)/2) + 2292/(1/2 -
I*3**(1/2)/2) +
328329/(14077 + 2*2507353**(1/2))**(2/3) + 328329/((1/2 +
I*3**(1/2)/2)**2*(14077 +
2*2507353**(1/2))**(2/3)) + 328329/((1/2 - I*3**(1/2)/2)**2*(14077 +
2*2507353**(1/2))**(2/3)) + 656658/((1/2 + I*3**(1/2)/2)*(14077 +
2*2507353**(1/2))**(2/3)) + 656658/((1/2 - I*3**(1/2)/2)*(14077 +
2*2507353**(1/2))**(2/3)) + 656658/((1/2 + I*3**(1/2)/2)*(1/2 -
I*3**(1/2)/2)*(14077
+ 2*2507353**(1/2))**(2/3)) - 16044/(14077 + 2*2507353**(1/2))**(1/3) -
16044/((1/2 +
I*3**(1/2)/2)*(14077 + 2*2507353**(1/2))**(1/3)) - 16044/((1/2 -
I*3**(1/2)/2)*(14077
+ 2*2507353**(1/2))**(1/3)) - 56*(14077 + 2*2507353**(1/2))**(1/3) +
4*(14077 +
2*2507353**(1/2))**(2/3))**(1/2) + 3*(92 + 2292/(14077 +
2*2507353**(1/2))**(1/3) +
4*(14077 + 2*2507353**(1/2))**(1/3))**(1/2) - 573/((1/2 +
I*3**(1/2)/2)*(14077 +
2*2507353**(1/2))**(1/3)) - 573/((1/2 - I*3**(1/2)/2)*(14077 +
2*2507353**(1/2))**(1/3)) - (14077 + 2*2507353**(1/2))**(1/3))**(1/2) +
1/4*(92 +
2292/(14077 + 2*2507353**(1/2))**(1/3) + 4*(14077 +
2*2507353**(1/2))**(1/3))**(1/2): 1}
(A test should be written, if not already done.)
In my opinion, quartic and cubic should be set True by default. Sympy is a
library
and not mainly interactive. And Axiom for instance prints such things
without asking.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---