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

Limit involving log(factorial(x)) incorrect #14793

Open
ethankward opened this Issue Jun 11, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@ethankward
Copy link
Contributor

ethankward commented Jun 11, 2018

From here, SymPy also gets this wrong but in a different way:

>>> from sympy import *
>>> x = Symbol('x')
>>> e = ((x + S(1)/2) * log(x) - x + log(2*pi)/2 - log(factorial(x)) + S(1)/(12*x))*x**3
>>> limit(e,x,oo)
-oo
>>> N(e.subs(x,1000))
0.00277777698412758

The correct answer is 1/360.

skirpichev added a commit to skirpichev/diofant that referenced this issue Jun 12, 2018

@0110G

This comment has been minimized.

Copy link

0110G commented Jun 21, 2018

I am new to open source and wanted to ask what is S(1) in the above code. Please help

@ethankward

This comment has been minimized.

Copy link
Contributor

ethankward commented Jun 21, 2018

S is a shortcut for sympify that turns a value into a SympPy object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment