This thread is being hijacked ;-) Please keep the new polys module discussions with Issue 1598.
Mateusz, I looked at the polys branch but don't see where terms_gcd is being used. Are we looking at the same branch? I'm looking at the polys version 6b6bc5b. Here is the test case that I am working with: f21 = (x - 1)**2 * (x + 4) / (x + a) / (x + 2) f = f21.diff(x, 3) I would like to see it (and any other sort of Basic expression) be factored easily. I see that if one gives the frac=True argument then this does factor (contrary to what I thought in comment 19 of issue 1598). But it is still taking too long, perhaps because the branch I am looking at does not call the gcd. Again, please let me know which is the right one. (This has me concerned because I am looking at the one that I rebased on master.) I did find the function terms_gcd. And as you say, making it work with basic expressions would be trivial. Ut can also make the work simple for a couple of other library routines: - separatevars could benefit from using this; right now it is using factor, but there is no need to work that hard to separate an expression into independent factors. One would only need to try factoring on terms which have more than one symbol in them after removing any gcd terms. - as_numer_denom() for an Add would benefit because the common factor in number and denom could be removed. This also helps in rootinfinding because the spurious roots would be thus avoided in a case like I mentioned at http://groups.google.com/group/sympy/browse_thread/thread/bf20021b670fb3f1/ee73860e3e77ec00?lnk=gst&q=spurious# -- You received this message because you are subscribed to the Google Groups "sympy-patches" group. To post to this group, send email to sympy-patc...@googlegroups.com. To unsubscribe from this group, send email to sympy-patches+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en.