From fa3e94ff798049fc092346115df05bd293accb8a Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 12 Feb 2019 18:09:14 +0000 Subject: [PATCH] 1F1: large z case: can't have b-a as a negative integer. --- .../boost/math/special_functions/detail/hypergeometric_asym.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/math/special_functions/detail/hypergeometric_asym.hpp b/include/boost/math/special_functions/detail/hypergeometric_asym.hpp index 08cd1bd3c..59b84c15b 100644 --- a/include/boost/math/special_functions/detail/hypergeometric_asym.hpp +++ b/include/boost/math/special_functions/detail/hypergeometric_asym.hpp @@ -126,6 +126,8 @@ } else if (fabs((1 - (b - a) + half_digits) * (a + half_digits) / (half_digits * z)) < 0.7) { + if ((floor(b - a) == (b - a)) && (b - a < 0)) + return false; // Can't have a negative integer b-a. in_region = true; // // double check that we are not divergent at the start if a,b < 0: