Comment #9 on issue 1520 by [email protected]: Inconsistency in subs
http://code.google.com/p/sympy/issues/detail?id=1520

subs is more constistent now and only does the substitution if old is multiplicatively extractable from expr.

    h[2] >>> x.subs(2*x, 1)
    x
    h[3] >>> (y*x).subs(2*x, 1)
    x*y
    h[4] >>> (x*y).subs(z*x, 1)
    x*y
    h[4] >>> (3*x*y).subs(2*x,1)
    3*x*y
    h[5] >>> (3*x*y).subs(4*x,1)
    3*x*y
    h[5] >>> (4*x*y).subs(2*x,1)  # succeeeds
    2*y
    h[6] >>> (4*x*y).subs(3*x,1)
    4*x*y

Should this be merged into issue 2026?

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