diff --git a/doc/sf/igamma.qbk b/doc/sf/igamma.qbk index 57e520513..1ce33d7a7 100644 --- a/doc/sf/igamma.qbk +++ b/doc/sf/igamma.qbk @@ -79,10 +79,10 @@ This function changes rapidly from 0 to 1 around the point z == a: [graph gamma_p] template - BOOST_MATH_GPU_ENABLED ``__sf_result`` lgamma_q(T1 a, T2 z); + BOOST_MATH_GPU_ENABLED ``__sf_result`` lgamma_p(T1 a, T2 z); template - BOOST_MATH_GPU_ENABLED ``__sf_result`` lgamma_q(T1 a, T2 z, const ``__Policy``&); + BOOST_MATH_GPU_ENABLED ``__sf_result`` lgamma_p(T1 a, T2 z, const ``__Policy``&); Returns the natural log of the normalized lower incomplete gamma function of a and z. diff --git a/include/boost/math/special_functions/gamma.hpp b/include/boost/math/special_functions/gamma.hpp index e67752861..a9c17da88 100644 --- a/include/boost/math/special_functions/gamma.hpp +++ b/include/boost/math/special_functions/gamma.hpp @@ -1842,9 +1842,7 @@ BOOST_MATH_GPU_ENABLED T lgamma_incomplete_lower_imp(T a, T x, const Policy& pol // we will lose precision in the result, selection logic here is extracted from gamma_incomplete_imp_final: // bool need_p = false; - if ((x < 0.5) && (T(-0.4) / log(x) < a)) - need_p = true; - else if ((x < 1.1) && (x >= 0.5) && (x * 0.75f < a)) + if ((x < 1.1) && (x >= 0.5) && (x * 0.75f < a)) need_p = true; else if ((x < a) && (x >= 1.1)) need_p = true;