Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 1469 by smichr: "can't decompose" error
http://code.google.com/p/sympy/issues/detail?id=1469
With x, a, b and c defined as symbols, factoring the following works:
###
>>> factor(a+b*x+c*x,x)
a + x*(b + c)
###
But if that c is changed to log(c) or 1/c (a power with a negative
exponent) then the factoring fails.
###
>>> factor(a+b*x+log(c)*x,x)
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Documents and Settings\chris\sympy\sympy\polys\factortools.py",
line 80, in factor
coeff, factors = poly_factors(f, *symbols, **flags)
File "C:\Documents and Settings\chris\sympy\sympy\polys\factortools.py",
line 36, in poly_factors
F = Poly(f, *symbols)
File "C:\Documents and Settings\chris\sympy\sympy\polys\polynomial.py",
line 389, in __new__
terms = Poly._decompose(poly.as_basic(), *symbols)
File "C:\Documents and Settings\chris\sympy\sympy\polys\polynomial.py",
line 545, in _decompose
raise PolynomialError("Can't decompose %s" % factor)
PolynomialError: Can't decompose log(c)
###
Is there any reason that the factoring couldn't just treat offending terms
like symbols? What is the reason that only raw symbols are allowed?
/c
--
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
-~----------~----~----~----~------~----~------~--~---