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) {