sympy/sympy — pull request #8688 by asmeurer (2014-12-24 19:27:39+00:00)
Title: Fix heurisch with floating point numbers

The code was incorrectly assuming that PolyElement.as_expr() would give a
Symbol for a single monomial, but if the ring is RR, it would give something
like 1.0*x, and x.subs(1.0*x, y) doesn't do the replacement. This prevented
it from correctly substituting in the solution, giving a wrong result of 0,
since all unsubstituted symbols are replaced with 0.

The fix was to guard against this using as_coeff_Mul().

Fixes #8685.