Skip to content
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

Series around Inf produces series around -Inf #341

Open
rakhusur opened this issue Apr 15, 2020 · 1 comment
Open

Series around Inf produces series around -Inf #341

rakhusur opened this issue Apr 15, 2020 · 1 comment

Comments

@rakhusur
Copy link

Hi, I'm getting the following behaviour:

julia> using SymPy

julia> @syms k
(k,)

julia> series(atan(k), x=k, x0=Inf)
   1      1     1   π    ⎛1         ⎞
- ──── + ──── - ─ - ─ + O⎜──; k → -∞⎟
     5      3   k   2    ⎜ 6        ⎟
  5⋅k    3⋅k             ⎝k         ⎠

With x0=-Inf, I get the same (this time correct) result. Running the same in python works fine.

@jverzani
Copy link
Collaborator

jverzani commented Jun 1, 2020

Sorry, I somehow missed this. A simple workaround is to use oo, not the floating point Inf. For some reason, that conversion isn't happening appropriately and I can't tell why not, as both sympify(Inf) and Sym(Inf) work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants