Comment #55 on issue 1598 by smichr: New polynomials manipulation module
http://code.google.com/p/sympy/issues/detail?id=1598
Perhaps the solution to comment 46 is to have Poly instantiate from a basic
expression with field=True automatically:
>>> p=Poly(3*x**3+5*x**2+7*x+11)
>>> roots(p)
Traceback (most recent call last):
.
.
.ExactQuotientFailed: 3 does not divide 5 in ZZ
That's because the field defaulted to ZZ. But if we had sent field=True we
would have
gotten a better result:
>>> p=Poly(3*x**3+5*x**2+7*x+11, field=True)
>>> roots(p)
{-5/9 + (989/729 + 1417**(1/2)/27)**(1/3)*(1/2 - I*3**(1/2)/2) -
38/(81*(1/2 -
I*3**(1/2)/2)*(989/729 + 1417**(1/2)/27)**(1/3)): 1, -5/9 + 38/(81*(989/729
+
1417**(1/2)/27)**(1/3)) - (989/729 + 1417**(1/2)/27)**(1/3): 1, -5/9 +
(989/729 +
1417**(1/2)/27)**(1/3)*(1/2 + I*3**(1/2)/2) - 38/(81*(1/2 +
I*3**(1/2)/2)*(989/729 +
1417**(1/2)/27)**(1/3)): 1}
because now field is QQ:
>>> print Poly(3*x**3+5*x**2+7*x+11, field=True)
Poly(3*x**3 + 5*x**2 + 7*x + 11, x, domain='QQ')
So if the user is just trying to make a generic poly, is there a reason not
to do
field=True for them or should they just get more of an education about
Polys before
trying to do anything with them?
--
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.