mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Update tests to provide more information, and disable tests that rely on long double overloads when those are known to be inaccurate.
[SVN r31772]
This commit is contained in:
@@ -625,31 +625,31 @@ void check_spots(const T&)
|
||||
BOOST_CHECK_CLOSE(result.imag(), half_pi, eps*200);
|
||||
|
||||
result = boost::math::atanh(ct(infinity, -pi));
|
||||
BOOST_CHECK(result.real() == zero);
|
||||
BOOST_CHECK_EQUAL(result.real(), zero);
|
||||
BOOST_CHECK_CLOSE(result.imag(), -half_pi, eps*200);
|
||||
|
||||
result = boost::math::atanh(ct(-infinity, -pi));
|
||||
BOOST_CHECK(result.real() == zero);
|
||||
BOOST_CHECK_EQUAL(result.real(), zero);
|
||||
BOOST_CHECK_CLOSE(result.imag(), -half_pi, eps*200);
|
||||
|
||||
result = boost::math::atanh(ct(-infinity, pi));
|
||||
BOOST_CHECK(result.real() == zero);
|
||||
BOOST_CHECK_EQUAL(result.real(), zero);
|
||||
BOOST_CHECK_CLOSE(result.imag(), half_pi, eps*200);
|
||||
|
||||
result = boost::math::atanh(ct(infinity, infinity));
|
||||
BOOST_CHECK(result.real() == zero);
|
||||
BOOST_CHECK_EQUAL(result.real(), zero);
|
||||
BOOST_CHECK_CLOSE(result.imag(), half_pi, eps*200);
|
||||
|
||||
result = boost::math::atanh(ct(infinity, -infinity));
|
||||
BOOST_CHECK(result.real() == zero);
|
||||
BOOST_CHECK_EQUAL(result.real(), zero);
|
||||
BOOST_CHECK_CLOSE(result.imag(), -half_pi, eps*200);
|
||||
|
||||
result = boost::math::atanh(ct(-infinity, -infinity));
|
||||
BOOST_CHECK(result.real() == zero);
|
||||
BOOST_CHECK_EQUAL(result.real(), zero);
|
||||
BOOST_CHECK_CLOSE(result.imag(), -half_pi, eps*200);
|
||||
|
||||
result = boost::math::atanh(ct(-infinity, infinity));
|
||||
BOOST_CHECK(result.real() == zero);
|
||||
BOOST_CHECK_EQUAL(result.real(), zero);
|
||||
BOOST_CHECK_CLOSE(result.imag(), half_pi, eps*200);
|
||||
|
||||
if(test_nan)
|
||||
|
||||
@@ -572,9 +572,14 @@ int test_main(int, char* [])
|
||||
// due to poor std lib support (not enough digits returned from
|
||||
// std::log and std::exp):
|
||||
//
|
||||
#if !defined(__CYGWIN__) && !defined(__FreeBSD__)
|
||||
#if !defined(__CYGWIN__) && !defined(__FreeBSD__) && !(defined(__GNUC__) && defined(__sun))
|
||||
std::cout << "Running long double tests" << std::endl;
|
||||
test((long double)(0));
|
||||
#else
|
||||
std::cout << "<note>The long double tests have been disabled on this platform "
|
||||
"either because the long double overloads of the usual math functions are "
|
||||
"not available at all, or because they are too inaccurate for these tests "
|
||||
"to pass.</note>" << std::cout;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user