Comment #1 on issue 3261 by [email protected]: factor_terms loses
powers
http://code.google.com/p/sympy/issues/detail?id=3261
Smaller reproducer:
-------------------------------------------------
import sympy as sp
a, b = sp.symbols("a b")
apb = (a + b)
x = apb + apb**2*(-2*a - 2*b)
print x
from sympy.simplify.cse_opts import sub_pre
x2 = sub_pre(x) # required for subsequent breakage
print x2
x3 = sp.gcd_terms(x2) # broken
print x3
-------------------------------------------------
prints:
-------------------------------------------------
a + b + (-2*a - 2*b)*(a + b)**2
a + b - (a + b)**2*(2*a + 2*b)
-a - b
-------------------------------------------------
--
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.