Comment #105 on issue 1598 by smichr: New polynomials manipulation module
http://code.google.com/p/sympy/issues/detail?id=1598

I see that teresm_gcd will take an expr or a list

l
[-2*x, 4, 6*x**2]
terms_gcd(Add(*l))
4 - 2*x + 6*x**2
terms_gcd(*l)
-2*x

I wonder if the last result should be 1 instead of -2*x since -2*x can't be extracted
from 4 (and isn't) when the 4 appears in an add.

In addition, perhaps powers could be returned unchanged and Mul's returned as Muls
with perhaps further gcd'ing only, so instead of

terms_gcd((1+x)**2)
1 + 2*x + x**2
terms_gcd((1+x)*(2+x))
2 + 3*x + x**2
^Z

one would get

terms_gcd((1+x)**2)
(1 + x)**2
terms_gcd((1+x)*(2+x))
(1 + x)*(2 + x)

And what about extracting numbers like factor does? Is that just a matter of
returning terms_gcd's result unevaluated?
terms_gcd(4+2*x)
4 + 2*x
factor(_)
2*(2 + x)


--
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.

Reply via email to