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

quadrature: address msvc CI failures.

This commit is contained in:
jzmaddock
2017-08-17 20:18:08 +01:00
parent 67cb813883
commit 307fd76013
3 changed files with 37 additions and 7 deletions

View File

@@ -979,14 +979,26 @@ test-suite misc :
: : : <define>TEST1 [ 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 sfinae_expr ] :
tanh_sinh_quadrature_test_1 ]
[ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework
: : : <define>TEST1A [ 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 sfinae_expr ] :
tanh_sinh_quadrature_test_1a ]
[ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework
: : : <define>TEST2 [ 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 sfinae_expr ] :
tanh_sinh_quadrature_test_2 ]
[ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework
: : : <define>TEST2A [ 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 sfinae_expr ] :
tanh_sinh_quadrature_test_2a ]
[ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework
: : : <define>TEST3 [ 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 sfinae_expr ] :
tanh_sinh_quadrature_test_3 ]
[ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework
: : : <define>TEST3A [ 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 sfinae_expr ] :
tanh_sinh_quadrature_test_3a ]
[ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework
: : : release <define>TEST4 [ 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 sfinae_expr ] :
@@ -999,6 +1011,10 @@ test-suite misc :
: : : <define>TEST6 [ 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 sfinae_expr ] :
tanh_sinh_quadrature_test_6 ]
[ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework
: : : <define>TEST6A [ 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 sfinae_expr ] :
tanh_sinh_quadrature_test_6a ]
[ run tanh_sinh_quadrature_test.cpp ../../test/build//boost_unit_test_framework
: : : release <define>TEST7 [ 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 sfinae_expr ] :

View File

@@ -158,8 +158,11 @@ void test_nr_examples()
Q_expected = pi<Real>();
BOOST_CHECK_CLOSE_FRACTION(Q, Q_expected, tol);
BOOST_CHECK_CLOSE_FRACTION(L1, Q_expected, tol);
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1900)
auto f2 = [](const Real& x) { return x > boost::math::tools::log_max_value<Real>() ? 0 : exp(-x*x); };
#else
auto f2 = [](const Real& x) { return exp(-x*x); };
#endif
Q = integrator.integrate(f2, integration_limit, &error, &L1);
Q_expected = root_pi<Real>();
BOOST_CHECK_CLOSE_FRACTION(Q, Q_expected, tol);

View File

@@ -32,7 +32,8 @@
#pragma warning(disable:4127) // Conditional expression is constant
#endif
#if !defined(TEST1) && !defined(TEST2) && !defined(TEST3) && !defined(TEST4) && !defined(TEST5) && !defined(TEST6) && !defined(TEST7) && !defined(TEST8)
#if !defined(TEST1) && !defined(TEST2) && !defined(TEST3) && !defined(TEST4) && !defined(TEST5) && !defined(TEST6) && !defined(TEST7) && !defined(TEST8)\
&& !defined(TEST1A) && !defined(TEST2A) && !defined(TEST3A) && !defined(TEST6A)
# define TEST1
# define TEST2
# define TEST3
@@ -41,6 +42,10 @@
# define TEST6
# define TEST7
# define TEST8
# define TEST1A
# define TEST2A
# define TEST3A
# define TEST6A
#endif
using std::expm1;
@@ -806,13 +811,14 @@ BOOST_AUTO_TEST_CASE(tanh_sinh_quadrature_test)
test_horrible<float>();
test_integration_over_real_line<float>();
test_nr_examples<float>();
#endif
#ifdef TEST1A
test_early_termination<float>();
test_crc<float>();
test_2_arg<float>();
#endif
#ifdef TEST2
test_right_limit_infinite<double>();
test_left_limit_infinite<double>();
test_linear<double>();
@@ -824,10 +830,11 @@ BOOST_AUTO_TEST_CASE(tanh_sinh_quadrature_test)
test_integration_over_real_line<double>();
test_nr_examples<double>();
test_early_termination<double>();
test_crc<double>();
test_sf<double>();
test_2_arg<double>();
#endif
#ifdef TEST2A
test_crc<double>();
#endif
#ifdef TEST3
@@ -843,9 +850,11 @@ BOOST_AUTO_TEST_CASE(tanh_sinh_quadrature_test)
test_integration_over_real_line<long double>();
test_nr_examples<long double>();
test_early_termination<long double>();
test_crc<long double>();
test_sf<long double>();
test_2_arg<long double>();
#endif
#ifdef TEST3A
test_crc<long double>();
#endif
@@ -886,9 +895,11 @@ BOOST_AUTO_TEST_CASE(tanh_sinh_quadrature_test)
test_integration_over_real_line<boost::math::concepts::real_concept>();
test_nr_examples<boost::math::concepts::real_concept>();
test_early_termination<boost::math::concepts::real_concept>();
test_crc<boost::math::concepts::real_concept>();
test_sf<boost::math::concepts::real_concept>();
test_2_arg<boost::math::concepts::real_concept>();
#endif
#ifdef TEST6A
test_crc<boost::math::concepts::real_concept>();
#endif
#ifdef TEST7