sympy/sympy — pull request #2144 by smichr (2013-05-31 12:57:02+00:00)
Title: watch for -Add exponents in factor_terms

If the exponent of a power is -Add, gcd_terms will rewrite it
distributing the -1 because of how Terms and Factors works, so
watch out for that.

now factor_terms(exp(-x-2) + x) will become exp(-(x+2))+x instead of being unchanged.