From 202500afc2df877d813522b5458de591d8a9ebd2 Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Thu, 28 Jul 2022 19:45:29 +0300 Subject: [PATCH] Add regression test Closes sympy/sympy#23845 --- diofant/tests/series/test_gruntz.py | 10 ++++++++++ docs/release/notes-0.14.rst | 1 + 2 files changed, 11 insertions(+) diff --git a/diofant/tests/series/test_gruntz.py b/diofant/tests/series/test_gruntz.py index e55bfcf428..07d1c09b86 100644 --- a/diofant/tests/series/test_gruntz.py +++ b/diofant/tests/series/test_gruntz.py @@ -458,3 +458,13 @@ def test_issue_75(): def test_sympyissue_8241(): e = x/log(x)**(log(x)/(m*log(log(x)))) assert isinstance(limit(e, x, oo), Limit) + + +def test_sympyissue_23845(): + e = ((-sqrt(5)*(-sqrt(5)/2 + Rational(3, 2))**x + + 5*(-sqrt(5)/2 + Rational(3, 2))**x + + (sqrt(5)/2 + Rational(3, 2))**x*(sqrt(5) + 5)) / + (-3*sqrt(5)*(-sqrt(5)/2 + Rational(3, 2))**x + + 5*(-sqrt(5)/2 + Rational(3, 2))**x + + (5 + 3*sqrt(5))*(sqrt(5)/2 + Rational(3, 2))**x)) + assert limit(e, x, oo) == (sqrt(5) + 5)/(5 + 3*sqrt(5)) diff --git a/docs/release/notes-0.14.rst b/docs/release/notes-0.14.rst index 7586791e3f..b2cc896ed2 100644 --- a/docs/release/notes-0.14.rst +++ b/docs/release/notes-0.14.rst @@ -94,3 +94,4 @@ These Sympy issues also were addressed: * :sympyissue:`22605`: Incorrect result from minpoly(cos(pi/9)) * :sympyissue:`23677`: minimal_polynomial fails for very complicated algebraic number * :sympyissue:`23836`: Incorrect results for limits of Piecewise at discontinuity +* :sympyissue:`23845`: Gruntz should have been free of _w, value error, recursion error