New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sympy.Sum() bug when summing up reciprocal of gamma #23156
Comments
Well I can say that the result for a random integer
|
Why does |
I can confirm that all cases involving positive
Yeah I would expect
|
Can we define |
I don't think we can do this cause |
If we identify a |
Shouldn't it be
Now expint(1, x) is finite real for all real positive x and finite imaginary for all real negative x
And we have
Once I get some clarity for a preferrable ans to be returned I'll address this basic change ! @smichr |
I don't think this would be the best way to address this . We shouldn't be writing code to address a particular case explicitly and try to build an approach which generally works fine overall ! |
x=sympy.Symbol("x")
a=sympy.Symbol("a")
sympy.Sum(1/sympy.gamma(x),(x,0,0)).doit()
sympy.Sum(1/sympy.gamma(x),(x,0,a)).doit().subs({a:0})
These two lines give different results. The first one gives 0, while the second one gives e.
The first result is correct.
The text was updated successfully, but these errors were encountered: