Status: Accepted Owner: asmeurer Labels: Type-Defect Priority-Medium
New issue 2302 by asmeurer: 2**Rational(4,5)*6**Rational(1,5) should auto-simplify to 2*3**Rational(1,5)
http://code.google.com/p/sympy/issues/detail?id=2302 Currently we have: In [294]: 2**Rational(4,5)*6**Rational(1,5) Out[294]: 4/5 5 ⎽⎽⎽ 2 ⋅╲╱ 6 In [295]: 2*3**Rational(1,5) Out[295]: 5 ⎽⎽⎽ 2⋅╲╱ 3 But these are the same: In [296]: N(2**Rational(4,5)*6**Rational(1,5)) Out[296]: 2.49146187923103 In [297]: N(2*3**Rational(1,5)) Out[297]: 2.49146187923103 You can also see it by: In [298]: 2**4*6 Out[298]: 96 In [299]: 96**Rational(1, 5) Out[299]: 5 ⎽⎽⎽ 2⋅╲╱ 3 We auto-simplify square roots in Mul, like In [301]: sqrt(2)*sqrt(12) Out[301]: ⎽⎽⎽ 2⋅╲╱ 6 so this should work too. This is the source of the woes from issue 2226. -- 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.
