[sympy] Re: factor giving wrong result

2018-01-25 Thread Leonid Kovalev
The bug is present in 1.1.1 but not in the current master branch on GitHub , so it was fixed already. You can clone SymPy from GitHub to use the current version, or avoid the bug by making the coefficients rational as mentioned earlier (which avoids other

[sympy] Re: factor giving wrong result

2018-01-25 Thread Leonid Kovalev
This is clearly a bug, hopefully one that will be fixed soon. Aside: symbolic manipulations are more robust when expressions involve rational numbers instead of floating point numbers. For example: y = a + Rational(1, 4)*b**2 + 1*b*c*x + 1*c**2*x**2 or y = a + Rational('0.25')*b**2 +