Comment #2 on issue 3712 by [email protected]: simplify cancels inconsistently
http://code.google.com/p/sympy/issues/detail?id=3712

It's because the "simpler expression" does not have a short ops count. If you pass oo for the ratio you will get

simplify((x-y)*(40*z-20)/10,oo)
4*x*z - 2*x - 4*y*z + 2*y
factor(_)
2*(x - y)*(2*z - 1)


If factor_terms is applied unconditionally to expressions at the outset then you would get

simplify((x-y)*(40*z-20)/10)
2*(x - y)*(2*z - 1)
simplify((x-y)*(40*z-10)/10)
(x - y)*(4*z - 1)


I've submitted a PR to do this. Let's see if anything breaks in doing so.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to