2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

Adjust tolerances for multiprecision cases, part2.

This commit is contained in:
jzmaddock
2024-03-01 12:34:57 +00:00
parent a9b169d3b8
commit b3c4ca5499
2 changed files with 3 additions and 1 deletions

View File

@@ -224,7 +224,7 @@ void test_bessel(T, const char* name)
BOOST_CHECK_EQUAL(boost::math::cyl_neumann(T(0), T(0)), -std::numeric_limits<T>::infinity());
BOOST_CHECK_EQUAL(boost::math::sph_neumann(2, boost::math::tools::min_value<T>() * 1.5f), -std::numeric_limits<T>::infinity());
T small = 5.69289e-1645L;
if (small != 0)
if ((small != 0) && (std::numeric_limits<T>::max_exponent10 < 4933))
{
BOOST_CHECK_EQUAL(boost::math::sph_neumann(2, small), -std::numeric_limits<T>::infinity());
}

View File

@@ -104,6 +104,8 @@ void test_binomial(T, const char* type_name)
BOOST_IF_CONSTEXPR(std::numeric_limits<T>::max_exponent10 > 4946)
{
if (!std::is_floating_point<T>::value)
tolerance *= 10;
BOOST_CHECK_CLOSE_FRACTION(boost::math::binomial_coefficient<T>(16441, 8151), SC_(5.928641856224322477306131563286843903129818155323061805272e4946), tolerance);
}
else BOOST_IF_CONSTEXPR(std::numeric_limits<T>::has_infinity && (std::numeric_limits<T>::max_exponent10 < 4950))