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

New issue 2988 by smi...@gmail.com: invalid expansion of Mul bases in Pow
http://code.google.com/p/sympy/issues/detail?id=2988

There is still a problem with invalid expansion of bases lurking in the core:

(-2*x*y**y)**3.2
(-2)**3.2*x**3.2*(y**y)**3.2
_.subs({x:-1,y:2}).n()
239.811674986167 + 738.064444127351*I
(-2*x*y**y).subs({x:-1,y:2}).n()**3.2
776.046882053324

The handling in mul/_eval_power should not treat the e.is_Float case differently than the e.is_Rational case. The result should look like this:

(-2*x*y**y)**3.2
2**3.2*(-x*y**y)**3.2
_.subs({x:-1,y:2}).n()
776.046882053324
(-2*x*y**y).subs({x:-1,y:2}).n()**3.2
776.046882053324


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