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

float128 tests: disable NaN check on Mingw.

This commit is contained in:
jzmaddock
2019-04-26 20:03:47 +01:00
parent 2e1e8a0038
commit df9bb98a12

View File

@@ -55,6 +55,20 @@
// the functionality of <cmath>, I/O stream operations, and <complex>
// functions for boost::float128_t.
// For some reason the (x != x) check fails on Mingw:
#if !defined(__MINGW64__)
#define TEST_CSTDFLOAT_SANITY_CHECK_NAN(the_digits) \
{ \
using std::sqrt; \
const float_type x = sqrt(float_type(test_cstdfloat::minus_one)); \
const bool the_nan_test = ( std::numeric_limits<float_type>::has_quiet_NaN \
&& (x != x)); \
BOOST_CHECK_EQUAL( the_nan_test, true ); \
}
#else
#define TEST_CSTDFLOAT_SANITY_CHECK_NAN(the_digits)
#endif
#define TEST_CSTDFLOAT_SANITY_CHECK(the_digits) \
void sanity_check_##the_digits##_func() \
{ \
@@ -89,13 +103,7 @@ void sanity_check_##the_digits##_func()
&& (x == std::numeric_limits<float_type>::infinity())); \
BOOST_CHECK_EQUAL( the_inf_test, true ); \
} \
{ \
using std::sqrt; \
const float_type x = sqrt(float_type(test_cstdfloat::minus_one)); \
const bool the_nan_test = ( std::numeric_limits<float_type>::has_quiet_NaN \
&& (x != x)); \
BOOST_CHECK_EQUAL( the_nan_test, true ); \
} \
TEST_CSTDFLOAT_SANITY_CHECK_NAN(the_digits)\
{ \
const bool the_lim_test = \
(std::numeric_limits<boost::floatmax_t>::digits >= std::numeric_limits<float_type>::digits); \