From 0404e838e2af86743a80352c6efd0609bc29335e Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 20 Jul 2020 09:28:40 +0100 Subject: [PATCH] No long double policy: Fix falling_factorial calls in factorials.hpp --- include/boost/math/special_functions/factorials.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/math/special_functions/factorials.hpp b/include/boost/math/special_functions/factorials.hpp index 83bdc7a52..51224c2bc 100644 --- a/include/boost/math/special_functions/factorials.hpp +++ b/include/boost/math/special_functions/factorials.hpp @@ -187,13 +187,13 @@ inline T falling_factorial_imp(T x, unsigned n, const Policy& pol) { // If the two end of the range are far apart we have a ratio of two very large // numbers, split the calculation up into two blocks: - T t1 = x * boost::math::falling_factorial(x - 1, max_factorial::value - 2); - T t2 = boost::math::falling_factorial(x - max_factorial::value + 1, n - max_factorial::value + 1); + T t1 = x * boost::math::falling_factorial(x - 1, max_factorial::value - 2, pol); + T t2 = boost::math::falling_factorial(x - max_factorial::value + 1, n - max_factorial::value + 1, pol); if(tools::max_value() / fabs(t1) < fabs(t2)) return boost::math::sign(t1) * boost::math::sign(t2) * policies::raise_overflow_error("boost::math::falling_factorial<%1%>", 0, pol); return t1 * t2; } - return x * boost::math::falling_factorial(x - 1, n - 1); + return x * boost::math::falling_factorial(x - 1, n - 1, pol); } if(x <= n - 1) {