Comment #2 on issue 1864 by smichr: AttributeError: is_commutative with Mul(Pow(2, 2, evaluate=False), 3, evaluate=False) + 1
http://code.google.com/p/sympy/issues/detail?id=1864

Also, doit will not recover the original expression for something like x/(2*(x+y))
since the args of this are

eq
x/(2*(x + y))
eq.args
(1/2, x, 1/(x + y))


The quirky 2-term-Mul behavior applies for a number type an Add but here you have a
number and a Mul (the 1/(x+y)) so when this is re-evaluated you don't get

x/(2*x+2*y)

One would have to do

n, d = eq.as_numer_denom()
n/d.func(*d.args)
x/(2*x + 2*y)
def doit(t):
...     if t.is_Atom:
...             return t
...     else:
...             return t.func(*t.args)
...     
doit(n)/doit(d)
x/(2*x + 2*y)


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

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