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

Adjust tolerances for Multiprecision test cases.

This commit is contained in:
jzmaddock
2024-02-29 19:48:01 +00:00
parent d893223266
commit a9b169d3b8
2 changed files with 4 additions and 3 deletions

View File

@@ -204,13 +204,14 @@ void test_bessel(T, const char* name)
#if LDBL_MAX_EXP >= 11356
BOOST_IF_CONSTEXPR (std::numeric_limits<T>::max_exponent >= 11356)
{
BOOST_CHECK_CLOSE_FRACTION(boost::math::cyl_bessel_i(T(0.5), T(11357)), SC_(7.173138695269929329584326974917488634629578339622112563648e4929), tolerance);
T mul = std::is_floating_point<T>::value ? 1 : 10;
BOOST_CHECK_CLOSE_FRACTION(boost::math::cyl_bessel_i(T(0.5), T(11357)), SC_(7.173138695269929329584326974917488634629578339622112563648e4929), tolerance * mul);
}
#endif
BOOST_IF_CONSTEXPR (std::numeric_limits<T>::max_exponent > 1000)
{
BOOST_IF_CONSTEXPR(std::is_floating_point<T>::value == false)
tolerance *= 2; // multiprecision type.
tolerance *= 4; // multiprecision type.
BOOST_CHECK_CLOSE_FRACTION(boost::math::cyl_bessel_i(0, T(700)), SC_(1.5295933476718737363162072288904508649662689614661164851272e302), tolerance);
BOOST_CHECK_CLOSE_FRACTION(boost::math::cyl_bessel_i(1, T(600)), SC_(6.1411813450668919369004006361519512681603654557478168763761e258), tolerance);
}

View File

@@ -240,7 +240,7 @@ void test_bessel(T, const char* name)
#if LDBL_MAX_EXP > 1024
if (std::numeric_limits<T>::max_exponent > 1024)
{
T tolerance = std::numeric_limits<T>::epsilon() * 400;
T tolerance = std::numeric_limits<T>::epsilon() * 1000;
BOOST_CHECK_CLOSE_FRACTION(boost::math::cyl_neumann(T(121.25), T(0.25)), SC_(-2.230082612409607659174017669618188190008214736253939486007e308), tolerance);
}
#endif