details: http://hg.sympy.org/sympy/rev/885e35e7f8a2 changeset: 1790:885e35e7f8a2 user: Stepan Roucka <[EMAIL PROTECTED]> date: Fri Oct 10 23:53:33 2008 +0200 description: Fix broken docstrings (#1147)
The patches implementing the rules for simplifying exponentiation have broken the doctests. The problem was fixed by setting the right assumptions. In both examples expression of the form 1/(x**a) needs to be simplified to x**(-a). In the evalf example, the exponent is summation index, so it is set to integer. The together example holds only for positive x and real y. diffs (24 lines): diff -r 8f3fbceae17d -r 885e35e7f8a2 sympy/core/evalf.py --- a/sympy/core/evalf.py Fri Oct 10 14:05:37 2008 +0200 +++ b/sympy/core/evalf.py Fri Oct 10 23:53:33 2008 +0200 @@ -1003,7 +1003,7 @@ Example: >>> from sympy import Sum, Symbol, oo - >>> k = Symbol("k") + >>> k = Symbol("k", integer=True) >>> Sum(1/k**k, (k, 1, oo)) Sum(k**(-k), (k, 1, oo)) >>> N(Sum(1/k**k, (k, 1, oo)), 4) diff -r 8f3fbceae17d -r 885e35e7f8a2 sympy/simplify/simplify.py --- a/sympy/simplify/simplify.py Fri Oct 10 14:05:37 2008 +0200 +++ b/sympy/simplify/simplify.py Fri Oct 10 23:53:33 2008 +0200 @@ -220,6 +220,8 @@ It also perfect possible to work with symbolic powers or exponential functions or combinations of both: + >>> x = Symbol('x', positive=True) + >>> y = Symbol('y', real=True) >>> together(1/x**y + 1/x**(y-1)) x**(-y)*(1 + x) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-commits" group. To post to this group, send email to sympy-commits@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sympy-commits?hl=en -~----------~----~----~----~------~----~------~--~---