On Mon, Mar 23, 2009 at 6:28 PM, Andrew <[email protected]> wrote: > > Hi Ondrej, > > I burrowed into the source code and the problem seems to be caused by > the pattern matching > in the `sympy/core/power.py` file. It expects a term of the form > k*x**l, but if there > are two terms of the same power in x it won't match. This gives l=0 > and the > following while loop doesn't terminate. > > term2 = rest.as_leading_term(x) > k, l = Wild("k"), Wild("l") > r = term2.match(k*x**l) > k, l = r[k], r[l] > ... > while l * m < n: > > A naive fix is attached below following, which seems to work, I'm not > sure what it's limitations are. > I think checking l>0 is a good thing though...
Thanks for debugging it! Could you please open a new issue for this? Do all test pass? Just execute bin/test Ondrej --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" 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?hl=en -~----------~----~----~----~------~----~------~--~---
