mirror of
https://github.com/boostorg/multiprecision.git
synced 2026-01-19 04:22:11 +00:00
Repair edge case runs
This commit is contained in:
@@ -330,7 +330,10 @@ std::ostream& operator<<(std::ostream& os, __float128 f)
|
||||
catch (const E&) {} \
|
||||
BOOST_MP_UNEXPECTED_EXCEPTION_CHECK(severity)
|
||||
#else
|
||||
#define BOOST_MT_CHECK_THROW_IMP(x, E, severity)
|
||||
#define BOOST_MT_CHECK_THROW_IMP(x, E, severity) \
|
||||
static_cast<void>(x); \
|
||||
static_cast<void>(E); \
|
||||
static_cast<void>(severity)
|
||||
#endif
|
||||
|
||||
#define BOOST_CHECK_CLOSE(x, y, tol) BOOST_CLOSE_IMP(x, y, ((tol / (100 * epsilon_of(x)))), error_on_fail)
|
||||
|
||||
@@ -1434,32 +1434,40 @@ namespace local
|
||||
const boost::int128_type n128_inf { static_cast<boost::int128_type>(flt_inf) };
|
||||
const boost::int128_type n128_zer { static_cast<boost::int128_type>(flt_zer) };
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
const boost::uint128_type u128_nan { static_cast<boost::uint128_type>(flt_nan) };
|
||||
const boost::uint128_type u128_inf { static_cast<boost::uint128_type>(flt_inf) };
|
||||
#endif
|
||||
const boost::uint128_type u128_zer { static_cast<boost::uint128_type>(flt_zer) };
|
||||
|
||||
const auto result_val_nan_is_ok = (n128_nan == static_cast<boost::int128_type>(std::numeric_limits<double>::quiet_NaN()));
|
||||
const auto result_val_inf_is_ok = (n128_inf == static_cast<boost::int128_type>(std::numeric_limits<double>::infinity()));
|
||||
const auto result_val_zer_is_ok = (n128_zer == static_cast<boost::int128_type>(0));
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
const auto result_val_unan_is_ok = (u128_nan == static_cast<boost::uint128_type>(std::numeric_limits<double>::quiet_NaN()));
|
||||
const auto result_val_uinf_is_ok = (u128_inf == static_cast<boost::uint128_type>(std::numeric_limits<double>::infinity()));
|
||||
#endif
|
||||
const auto result_val_uzer_is_ok = (u128_zer == static_cast<boost::uint128_type>(0));
|
||||
|
||||
BOOST_TEST(result_val_nan_is_ok);
|
||||
BOOST_TEST(result_val_inf_is_ok);
|
||||
BOOST_TEST(result_val_zer_is_ok);
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
BOOST_TEST(result_val_unan_is_ok);
|
||||
BOOST_TEST(result_val_uinf_is_ok);
|
||||
#endif
|
||||
BOOST_TEST(result_val_uzer_is_ok);
|
||||
|
||||
result_is_ok = (result_val_nan_is_ok && result_is_ok);
|
||||
result_is_ok = (result_val_inf_is_ok && result_is_ok);
|
||||
result_is_ok = (result_val_zer_is_ok && result_is_ok);
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
result_is_ok = (result_val_unan_is_ok && result_is_ok);
|
||||
result_is_ok = (result_val_uinf_is_ok && result_is_ok);
|
||||
#endif
|
||||
result_is_ok = (result_val_uzer_is_ok && result_is_ok);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user