Updates:
        Cc: Vinzent.Steinberg asmeurer

Comment #22 on issue 51 by smichr: RootOf for polynomial equations
http://code.google.com/p/sympy/issues/detail?id=51

Rather than opening a new issue I thought I would ask here whether factor might benefit from replacing RootOf instances with dummy variables before trying to factor. Their presence slows things down by a factor of 2:

timeit('sympy.factor(q)', '''import sympy\nsympy.var('x');q=sympy.Mul(*[sympy.C.Dummy(str(i))-sympy.RootOf(sympy.Poly(1+3*x**2-4*x**5+x**6,x),i) for i in range(6)])''',number=100)
79.699074044326863
timeit('qq=q.subs(zip(q.atoms(sympy.RootOf), [sympy.C.Dummy("x")]*6))\nsympy.factor(qq)', '''import sympy\nsympy.var('x');q=sympy.Mul(*[sympy.C.Dummy(str(i))-sympy.C.Dummy(str(i)) for i in range(6)])''',number=100)
43.89831361248423


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