Comment #2 on issue 1305 by danielstefanmader: sympy.roots not working for  
slightly more complicated polynomials
http://code.google.com/p/sympy/issues/detail?id=1305

Here's a traceback I get when I interrupt after some minutes:

>>> sympy.roots(f2,x)
^CTraceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "sympy/polys/rootfinding.py", line 276, in roots
     for i, h in enumerate(poly_sqf(g)):
   File "sympy/polys/algorithms.py", line 740, in poly_sqf
     g = poly_gcd(f, h)
   File "sympy/polys/algorithms.py", line 470, in poly_gcd
     h = poly_subresultants(f, g)[-1]
   File "sympy/polys/algorithms.py", line 693, in poly_subresultants
     h = poly_pdiv(f, g)[1]
   File "sympy/polys/algorithms.py", line 144, in poly_pdiv
     r = r.mul_term(coeff)-g.mul_term(*T)
   File "sympy/polys/polynomial.py", line 1835, in mul_term
     coeffs[i] = Poly.cancel(coeff)
   File "sympy/polys/polynomial.py", line 640, in cancel
     g = sympy.polys.algorithms.poly_gcd(p, q)
   File "sympy/polys/algorithms.py", line 468, in poly_gcd
     h = poly_div(f*g, poly_lcm(f, g))[0]
   File "sympy/polys/algorithms.py", line 392, in poly_lcm
     H = [ h for h in poly_groebner((F, G)) if independent(h) ]
   File "sympy/polys/algorithms.py", line 324, in poly_groebner
     R, P, G, B = generate(R, P, G, B)
   File "sympy/polys/algorithms.py", line 235, in generate
     h = normal(f[R.pop()], G | P)
   File "sympy/polys/algorithms.py", line 222, in normal
     h = poly_div(g, [ f[i] for i in H ])[1]
   File "sympy/polys/algorithms.py", line 92, in poly_div
     f -= h.mul_term(coeff, monom)
   File "sympy/polys/polynomial.py", line 910, in __sub__
     coeff -= terms[monom]
   File "sympy/core/sympify.py", line 244, in __sympifyit_wrapper
     return func(a, b)
   File "sympy/core/basic.py", line 654, in __sub__
     return Add(self, -other)
   File "sympy/core/cache.py", line 85, in wrapper
     func_cache_it_cache[k] = r = func(*args, **kw_args)
   File "sympy/core/operations.py", line 32, in __new__
     c_part, nc_part, order_symbols = cls.flatten(map(_sympify, args))
   File "sympy/core/add.py", line 49, in flatten
     coeff += o
   File "sympy/core/sympify.py", line 244, in __sympifyit_wrapper
     return func(a, b)
   File "sympy/core/numbers.py", line 567, in __add__
     return Rational(self.p * other.q + self.q * other.p, self.q * other.q)
   File "sympy/core/cache.py", line 278, in wrapper
     r = func(*new_args, **new_kw_args)
   File "sympy/core/numbers.py", line 515, in __new__
     n = igcd(abs(p), q)
   File "sympy/core/numbers.py", line 47, in igcd
     a, b = b, a % b
KeyboardInterrupt


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