Comment #109 on issue 1598 by mattpap: 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

It does not allow lists. What you did with terms_gcd(*l) is you computed terms_gcd()
of l[0] with generators l[1:].

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

Just use expand=False with polynomial manipulation functions. Note that case when
generators are Add instances is not yet handled well.

And what about extracting numbers like factor does? Is that just a matter of
returning terms_gcd's result unevaluated?

Yes, as always with current core. This works (as expected):

In [14]: terms_gcd(4*x + 2*x**2)
Out[14]: 2⋅x⋅(2 + x)

I will add evaluate=False hack to terms_gcd() and hope that someone will find time time to get rid of this automatic distribution of constants or at least fix related
problems.


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