There is another problem that I noticed while trying this: nsimplify has troubles with the Floats in this expression because while doing successive substitutions, the expression changes and creates new Floats that weren't detected on the first pass. Using xreplace (with a dictionary of replacements) does not work either. Simultaneous substitution solves the problem:
-3.0*z**2*(x**2 + y**2 + z**2)**(-2.5) + 3*(x**2 + y**2 + z**2)**(-1.5) >>> eq=_ >>> nsimplify(factor(eq.subs(x,0))) -3.0*z**2/(y**2 + z**2)**(5/2) + 3.0/(y**2 + z**2)**(3/2) Notice the leading 3.0 which should be a 3. This is fixed in https://github.com/sympy/sympy/pull/1339 . If all tests pass this is a 1 minute review. -- You received this message because you are subscribed to the Google Groups "sympy" 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?hl=en.
