sympy/sympy — pull request #7832 by smichr (2014-08-06 16:27:49+00:00)
Title: modifications of arg

There are two changes here to arg:

1) it leaves arguments containing AppliedUndef unevaluated, so `arg(f(0) + I*f(1))` does not become `atan2(re(f(1)) + im(f(0)), re(f(0)) - im(f(1)))`

2) factors that don't change the value of arg are removed so arg(2*x) just becomes arg(x).