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

Order at negative infinity #15539

Closed
normalhuman opened this Issue Nov 24, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@normalhuman
Copy link
Contributor

normalhuman commented Nov 24, 2018

The concept of Order at negative infinity seems to not be supported:

>>> from sympy import *
>>> from sympy.abc import x
>>> O(x**(-6), (x, -oo))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/k3/sympy/sympy/series/order.py", line 218, in __new__
    expr = expr.as_leading_term(*args)
  File "/home/k3/sympy/sympy/core/expr.py", line 2960, in as_leading_term
    raise ValueError('expecting a Symbol but got %s' % x)
ValueError: expecting a Symbol but got nan

This concept is necessary to correctly express the following asymptotic, which is currently wrong.

>>> series(exp(x), x, -oo)
O(x**(-6), (x, oo))

(should be O(x**(-6), (x, -oo)))

skirpichev added a commit to skirpichev/diofant that referenced this issue Nov 24, 2018

skirpichev added a commit to skirpichev/diofant that referenced this issue Nov 28, 2018

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