2
0
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:
John Maddock
2005-11-24 18:44:24 +00:00
parent 48eb2d3f9b
commit cb13210a12
2 changed files with 13 additions and 8 deletions

View File

@@ -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)

View File

@@ -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;
}