diff --git a/include/boost/math/special_functions/gamma.hpp b/include/boost/math/special_functions/gamma.hpp index 46045b8cc..f17f7fa94 100644 --- a/include/boost/math/special_functions/gamma.hpp +++ b/include/boost/math/special_functions/gamma.hpp @@ -131,11 +131,6 @@ BOOST_MATH_GPU_ENABLED T gamma_imp_final(T z, const Policy& pol, const Lanczos& if(z <= 0) { - if(floor(z) == z) - { - return policies::raise_pole_error(function, "Evaluation of tgamma at a negative integer %1%.", z, pol); - } - // shift z to > 1: while(z < 0) { @@ -225,7 +220,8 @@ BOOST_MATH_GPU_ENABLED BOOST_MATH_FORCEINLINE T gamma_imp(T z, const Policy& pol { if ((fabs(result) < 1) && (tools::max_value() * fabs(result) < boost::math::constants::pi())) { - return policies::raise_overflow_error(function, nullptr, pol); + return policies::raise_overflow_error(function, nullptr, pol); // LCOV_EXCL_LINE MP only. + } } else @@ -1302,12 +1298,6 @@ template BOOST_MATH_GPU_ENABLED T gamma_incomplete_imp_final(T a, T x, bool normalised, bool invert, const Policy& pol, T* p_derivative) { - constexpr auto function = "boost::math::gamma_p<%1%>(%1%, %1%)"; - if(a <= 0) - return policies::raise_domain_error(function, "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol); - if(x < 0) - return policies::raise_domain_error(function, "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol); - BOOST_MATH_STD_USING typedef typename lanczos::lanczos::type lanczos_type; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 88984f5dc..d94d40c5c 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -575,6 +575,7 @@ test-suite special_fun : [ run test_tgamma_for_issue396_part1.cpp /boost/test//boost_unit_test_framework : : : $(float128_type) gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] [ run test_tgamma_for_issue396_part2.cpp /boost/test//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : no ] ] [ run test_tgamma_ratio.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] + [ run test_tgamma_eh.cpp /boost/test//boost_unit_test_framework ] [ run test_trig.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ] [ run test_zeta.cpp /boost/test//boost_unit_test_framework test_instances//test_instances pch_light ] [ run test_sinc.cpp /boost/test//boost_unit_test_framework pch_light ]