Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Mar 28, 2021
1 parent 69b7f6a commit 8507e37
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions diofant/tests/series/test_series.py
Expand Up @@ -243,3 +243,14 @@ def test_sympyissue_18008():
s = e.series(x, x0=oo, n=4)
ss = es.series(x, x0=oo, n=4)
assert s == ss


def test_sympyissue_20697():
p0, p1, p2, p3 = symbols('p:4')
b0, b1, b2 = symbols('b:3')

e = ((p0 + (p1 + (p2 + p3/y)/y)/y) /
(1 + ((p3/(b0*y) + (b0*p2 - b1*p3)/b0**2)/y +
(b0**2*p1 - b0*b1*p2 - p3*(b0*b2 - b1**2))/b0**3)/y))

assert e.series(y, n=3) == b2*y**2 + b1*y + b0 + O(y**3)
1 change: 1 addition & 0 deletions docs/release/notes-0.13.rst
Expand Up @@ -63,3 +63,4 @@ These Sympy issues also were addressed:
* :sympyissue:`21180`: Bug: sympy.factor doesn't work for Poly !!!
* :sympyissue:`21167`: Empty list of solutions returned for equation with cubic roots
* :sympyissue:`21029`: Continuous limits involving division by x
* :sympyissue:`20697`: Series is not simplified to final answer in output in sympy 1.7.1

0 comments on commit 8507e37

Please sign in to comment.