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

Update error rates to match MinGW

This commit is contained in:
Matt Borland
2022-02-10 10:58:31 +01:00
parent 24ebba0db4
commit 08717a8391
11 changed files with 192 additions and 2 deletions

View File

@@ -1005,7 +1005,7 @@ test-suite misc :
[ run quartic_roots_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ]
[ run test_t_test.cpp : : : [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <define>BOOST_MATH_TEST_FLOAT128 <linkflags>"-Bstatic -lquadmath -Bdynamic" ] [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ]
[ run test_z_test.cpp : : : [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <define>BOOST_MATH_TEST_FLOAT128 <linkflags>"-Bstatic -lquadmath -Bdynamic" ] [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ]
[ run bivariate_statistics_test.cpp : : : [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ]
[ run bivariate_statistics_test.cpp : : : [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : <build>no ] ]
[ run linear_regression_test.cpp : : : [ requires cxx11_hdr_forward_list cxx11_hdr_atomic cxx11_hdr_thread cxx11_hdr_tuple cxx11_hdr_future cxx11_sfinae_expr ] ]
[ run test_runs_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ]
[ run lanczos_smoothing_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx17_if_constexpr cxx17_std_apply ] ]
@@ -1268,7 +1268,7 @@ test-suite quadrature :
[ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax sfinae_expr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] :
tanh_sinh_quadrature_test_9 ]
[ run tanh_sinh_mpfr.cpp ../tools//mpfr ../tools//gmp : : : [ check-target-builds ../config//has_mpfr : : <build>no ] [ check-target-builds ../config//has_gmp : : <build>no ] [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] release <toolset>clang:<cxxflags>-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
[ run tanh_sinh_mpfr.cpp ../tools//mpfr ../tools//gmp : : : [ check-target-builds ../config//has_mpfr : : <build>no ] [ check-target-builds ../config//has_gmp : : <build>no ] [ check-target-builds ../config//is_cygwin_run "Cygwin CI run" : <build>no ] [ requires cxx11_hdr_initializer_list cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_smart_ptr ] release <toolset>clang:<cxxflags>-Wno-literal-range [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
[ run sinh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework
: : : release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] ]
[ run exp_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework

View File

@@ -60,6 +60,16 @@ void expected_results()
".*", // test data group
".*", 400, 200); // test function
//
// Cygwin:
//
add_expected_result(
"GNU.*", // Compiler
".*", // Stdlib
"Cygwin*", // Platform
largest_type, // test type(s)
".*", // test data group
".*", 400, 200); // test function
//
// G++ on Linux, results vary a bit by processor type,
// on Itanium results are *much* better than listed here,
// but x86 appears to have much less accurate std::pow

View File

@@ -59,11 +59,22 @@ void expected_results()
largest_type, // test type(s)
".*", // test data group
#ifdef __aarch64__
// Error rates for M1 macs are higher than x86_64 macs
".*", 4000, 1500); // test function
#else
".*", 3500, 1500); // test function
#endif
//
// Cygwin:
//
add_expected_result(
"GNU.*", // Compiler
".*", // Stdlib
"Cygwin*", // Platform
largest_type, // test type(s)
".*", // test data group
".*", 500, 200); // test function
//
// G++ on Linux, results vary a bit by processor type,
// on Itanium results are *much* better than listed here,
// but x86 appears to have much less accurate std::pow

View File

@@ -152,6 +152,30 @@ void expected_results()
".*Yn.*", // test data group
".*", 30000, 30000); // test function
//
// Cygwin:
//
add_expected_result(
"GNU.*", // compiler
".*", // stdlib
"Cygwin*", // platform
largest_type, // test type(s)
".*Yv.*Random.*", // test data group
".*", 400000, 300000); // test function
add_expected_result(
"GNU.*", // compiler
".*", // stdlib
"Cygwin*", // platform
largest_type, // test type(s)
".*Y[01v].*", // test data group
".*", 2000, 1000); // test function
add_expected_result(
"GNU.*", // compiler
".*", // stdlib
"Cygwin*", // platform
largest_type, // test type(s)
".*Yn.*", // test data group
".*", 30000, 30000); // test function
//
// Solaris version of long double has it's own error rates,
// again just a touch higher than msvc's 64-bit double:
//

View File

@@ -152,6 +152,31 @@ void expected_results()
".*Y'n.*", // test data group
".*", 30000, 30000); // test function
//
// Cygwin:
// Use the same error rates as MinGW
//
add_expected_result(
"GNU.*", // compiler
".*", // stdlib
"Cygwin*", // platform
largest_type, // test type(s)
".*Y'v.*Random.*", // test data group
".*", 400000, 300000); // test function
add_expected_result(
"GNU.*", // compiler
".*", // stdlib
"Cygwin*", // platform
largest_type, // test type(s)
".*Y'[01v].*", // test data group
".*", 2000, 1000); // test function
add_expected_result(
"GNU.*", // compiler
".*", // stdlib
"Cygwin*", // platform
largest_type, // test type(s)
".*Y'n.*", // test data group
".*", 30000, 30000); // test function
//
// Solaris version of long double has it's own error rates,
// again just a touch higher than msvc's 64-bit double:
//

View File

@@ -84,6 +84,31 @@ void expected_results()
"real_concept", // test type(s)
"near.*", // test data group
"tgamma", 200, 100); // test function
//
// Cygwin:
//
add_expected_result(
"GNU.*", // compiler
".*", // stdlib
"Cygwin*", // platform
largest_type, // test type(s)
"factorials", // test data group
"tgamma", 100, 15); // test function
add_expected_result(
"GNU.*", // compiler
".*", // stdlib
"Cygwin*", // platform
"real_concept", // test type(s)
"factorials", // test data group
"tgamma", 600, 200); // test function
add_expected_result(
"GNU.*", // compiler
".*", // stdlib
"Cygwin*", // platform
"real_concept", // test type(s)
"near.*", // test data group
"tgamma", 200, 100); // test function
//
// G++ on Linux, result vary a bit by processor type,
// on Itanium results are *much* better than listed here,

View File

@@ -202,6 +202,30 @@ void expected_results()
largest_type, // test type(s)
"(?i).*large.*", // test data group
".*", 200000, 10000); // test function
//
// Cygwin:
//
add_expected_result(
"GNU[^|]*", // compiler
"[^|]*", // stdlib
"Cygwin*", // platform
"real_concept", // test type(s)
"(?i).*medium.*", // test data group
".*", 400, 50); // test function
add_expected_result(
"GNU.*", // compiler
".*", // stdlib
"Cygwin*", // platform
"double", // test type(s)
"(?i).*large.*", // test data group
".*", 20, 10); // test function
add_expected_result(
"GNU.*", // compiler
".*", // stdlib
"Cygwin*", // platform
largest_type, // test type(s)
"(?i).*large.*", // test data group
".*", 200000, 10000); // test function
#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
//

View File

@@ -239,6 +239,44 @@ void expected_results()
"real_concept", // test type(s)
"[^|]*integer[^|]*", // test data group
".*", 100, 50); // test function
//
// Cygwin:
//
add_expected_result(
"GNU[^|]*", // compiler
"[^|]*", // stdlib
"Cygwin*", // platform
"real_concept", // test type(s)
"[^|]*medium[^|]*", // test data group
"[^|]*", 1300, 200); // test function
add_expected_result(
"GNU[^|]*", // compiler
"[^|]*", // stdlib
"Cygwin*", // platform
largest_type, // test type(s)
"[^|]*medium[^|]*", // test data group
"[^|]*", 700, 200); // test function
add_expected_result(
"GNU[^|]*", // compiler
"[^|]*", // stdlib
"Cygwin*", // platform
largest_type, // test type(s)
"[^|]*small[^|]*", // test data group
"[^|]*", 100, 50); // test function
add_expected_result(
"GNU[^|]*", // compiler
"[^|]*", // stdlib
"Cygwin*", // platform
largest_type, // test type(s)
"[^|]*integer[^|]*", // test data group
".*", 120, 50); // test function
add_expected_result(
"GNU[^|]*", // compiler
"[^|]*", // stdlib
"Cygwin*", // platform
"real_concept", // test type(s)
"[^|]*integer[^|]*", // test data group
".*", 100, 50); // test function
//
// Large exponent range causes more extreme test cases to be evaluated:

View File

@@ -81,6 +81,20 @@ void expected_results()
"real_concept", // test type(s)
".*", // test data group
".*", 40000, 1000); // test function
add_expected_result(
"GNU.*", // compiler
".*", // stdlib
"Cygwin*", // platform
largest_type, // test type(s)
".*", // test data group
".*", 40000, 1000); // test function
add_expected_result(
"GNU.*", // compiler
".*", // stdlib
"Cygwin*", // platform
"real_concept", // test type(s)
".*", // test data group
".*", 40000, 1000); // test function
add_expected_result(
"GNU.*", // compiler
".*", // stdlib

View File

@@ -539,7 +539,12 @@ void test_daubechies_fails()
template<class Real>
void test_solve_real_quadratic()
{
#ifndef __CYGWIN__
Real tol = std::numeric_limits<Real>::epsilon();
#else
Real tol = 2*std::numeric_limits<Real>::epsilon();
#endif
using boost::math::tools::quadratic_roots;
auto [x0, x1] = quadratic_roots<Real>(1, 0, -1);
BOOST_CHECK_CLOSE(x0, Real(-1), tol);
@@ -567,6 +572,9 @@ void test_solve_real_quadratic()
BOOST_CHECK_CLOSE(p.second, Real(1) + eps, tol);
}
// This test does not pass with cygwin; error exceeds 1e7
// See: https://github.com/boostorg/math/runs/5123942222?check_suite_focus=true#step:13:653
#ifndef __CYGWIN__
if (std::is_same<Real, double>::value)
{
// Kahan's example: This is the test that demonstrates the necessity of the fma instruction.
@@ -575,6 +583,7 @@ void test_solve_real_quadratic()
BOOST_CHECK_CLOSE_FRACTION(p.first, Real(1), tol);
BOOST_CHECK_CLOSE_FRACTION(p.second, 1.000000028975958, 4*tol);
}
#endif
}
template<class Z>

View File

@@ -86,6 +86,16 @@ void expected_results()
"[^|]*", // test data group
"tgamma_ratio[^|]*", 300, 100); // test function
//
// Cygwin
//
add_expected_result(
"GNU.*", // compiler
"[^|]*", // stdlib
"Cygwin*", // platform
largest_type, // test type(s)
"[^|]*", // test data group
"tgamma_ratio[^|]*", 300, 100); // test function
//
// Solaris:
//
add_expected_result(