Status: Accepted
Owner: asmeurer
Labels: Type-Defect Priority-Medium Printing

New issue 2532 by asmeurer: Non-commutative inverses should not print as fractions
http://code.google.com/p/sympy/issues/detail?id=2532

The notation a/b only makes sense if a and b are commutative. Otherwise, a*b**-1 and b**-1*a are different animals. Thus, we should not print inverses of non-commutative symbols as fractions. This leads to some confusing printing, like

In [22]: a, b = symbols('a b', commutative=False)

In [23]: diff(f(a)**-1, a)
Out[23]:
 d
-──(f(a))
 da
─────────
f(a)⋅f(a)

In [24]: print diff(f(a)**-1, a)
-Derivative(f(a), a)/(f(a)*f(a))

In [25]: diff(f(a)**-1, a).args
Out[25]:
⎛     1    d          1  ⎞
⎜-1, ────, ──(f(a)), ────⎟
⎝    f(a)  da        f(a)⎠


--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to