Comment #4 on issue 2555 by asmeurer: Wrong result from residue
http://code.google.com/p/sympy/issues/detail?id=2555
residue() also is wrong for expressions that behave a little nicer than
this. For example:
In [36]: expr = exp(z)/(z - pi*I/4*a)**n
In [37]: residue(expr, z, I*pi*a/4)
Out[37]: 0
The problem is that series() does not play so well with symbolic
exponents. The answer should be exp(I*pi*a/4)/(n - 1)!. A lot of stuff
relies on residue recognizing when the residue is 0, but I think we should
replace the final condition in the code to raise NotImplementedError (or an
unevaluated object), and find a better way to recognize a 0 residue (like
perhaps my suggestion above).
And by the way, I think maybe gosper_sum is meant for internal use, where
it can sometimes be nicer to return None on failure, since it's not
imported by default. You should use summation() if you want to do a sum.
--
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.