On Feb 22, 2011, at 10:52 AM, Chris Smith wrote: > andyl wrote: >> Hi >> >> I have been trying out sympy, working through the examples in the >> documentation. All went well, and was impressive, until I tried to >> factor polynomials. The example in the documentation was >> >> f = 4*x**4 + 8*x**3 + 77*x**2 + 18*x + 153 >> >> and factor(f) gave (9 + 4*x**2)*(17 + 2*x + x**2) as expected. >> >> But then factor(f, gaussian=True) or factor(f, extension=I) should >> give according the documentation: >> >> 4*(x - 3*I/2)*(x + 3*I/2)*(x - 4*I + 1)*(x + 4*I + 1) >> >> Instead I get the same result as before, ie (9 + 4*x**2)*(17 + 2*x + >> x**2) >> > > Make sure you use the flag gaussian=True not gaussian=1 (at least in the new > polys12 branch) since it's picky in that regard. >
This should be fixed. Aaron Meurer > All in polys12: > > h[2] >>> f = 4*x**4 + 8*x**3 + 77*x**2 + 18*x + 153 > h[2] >>> factor(f) > (9 + 4*x**2)*(17 + 2*x + x**2) > h[3] >>> factor(f,gaussian=1) > (9 + 4*x**2)*(17 + 2*x + x**2) > h[3] >>> factor(f,gaussian=True) > 4*(x - 3*I/2)*(x + 3*I/2)*(1 + x - 4*I)*(1 + x + 4*I) > h[4] >>> factor(f,extension=I) > 4*(x - 3*I/2)*(x + 3*I/2)*(1 + x - 4*I)*(1 + x + 4*I) > h[4] >>> factor(6*x-10) > 2*(-5 + 3*x) > > /c -- 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.
