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

Bug with limit #9558

Open
proy87 opened this Issue Jun 23, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@proy87
Copy link

proy87 commented Jun 23, 2015

limit(sin(x)**15,x,0,'+') works
limit(sin(x)**15,x,0,'-') hangs

skirpichev added a commit to diofant/diofant that referenced this issue Mar 17, 2016

Add regression test for sympy/sympy#9558
This was fixed in f572eea and 3e5ff87.

Old benchmark (or right now in the sympy master):
In [2]: %time limit(sin(x)**15, x, 0, '-')
CPU times: user 2min 41s, sys: 4.16 s, total: 2min 45s
Wall time: 3min 50s

Closes sympy/sympy#9558
Closes #172

Perhaps, we should use timeout's in tests like this to better
catch such regressions in future.  E.g. by using timeout
context as in this example:
http://stackoverflow.com/questions/2281850/timeout-function-if-it-takes-too-long-to-finish/22348885#22348885
@zanzibar7

This comment has been minimized.

Copy link
Contributor

zanzibar7 commented Mar 25, 2016

limit(sin(0-1/x)**15,x,oo) also hangs. although limit(sin(0-1/x)**13,x,oo) completes successfully but slowly. Feels like this might be an issue with recursion reaching it's limitations. Approaching from the positive side is probably working better because on the negative side, powers of negatives force us into the complex plane in general (though not when the power is an integer!).

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