Skip to content

Commit

Permalink
Merge pull request #965 from boostorg/quad
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland authored Mar 7, 2023
2 parents cf6cd75 + d3a3dd3 commit 2fe1fac
Show file tree
Hide file tree
Showing 27 changed files with 174 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
run: ./config_info_travis
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET ${{ matrix.suite }} define=CI_SUPPRESS_KNOWN_ISSUES define=SLOW_COMPILER
run: ../../../b2 toolset=$TOOLSET ${{ matrix.suite }} define=CI_SUPPRESS_KNOWN_ISSUES define=SLOW_COMPILER define=BOOST_MATH_RUN_MP_TESTS
working-directory: ../boost-root/libs/math/test
ubuntu-focal-no-eh:
runs-on: ubuntu-20.04
Expand Down
7 changes: 4 additions & 3 deletions test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -843,9 +843,6 @@ test-suite distribution_tests :
[ run test_rayleigh.cpp ../../test/build//boost_unit_test_framework ]
[ run test_students_t.cpp ../../test/build//boost_unit_test_framework ]
[ run test_skew_normal.cpp ../../test/build//boost_unit_test_framework ]
[ run test_trapezoidal.cpp ../../test/build//boost_unit_test_framework : : :
release [ requires cxx11_lambdas cxx11_auto_declarations cxx11_decltype cxx11_unified_initialization_syntax cxx11_variadic_templates ]
[ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>"-Bstatic -lquadmath -Bdynamic" ] ]
[ run test_triangular.cpp pch ../../test/build//boost_unit_test_framework ]
[ run test_uniform.cpp pch ../../test/build//boost_unit_test_framework ]
[ run test_weibull.cpp ../../test/build//boost_unit_test_framework ]
Expand Down Expand Up @@ -1470,6 +1467,10 @@ test-suite quadrature :
[ compile compile_test/gauss_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
[ compile compile_test/gauss_kronrod_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : <build>no ] ]
[ run git_issue_898.cpp ]

[ run test_trapezoidal.cpp ../../test/build//boost_unit_test_framework : : :
release [ requires cxx11_lambdas cxx11_auto_declarations cxx11_decltype cxx11_unified_initialization_syntax cxx11_variadic_templates ]
[ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>"-Bstatic -lquadmath -Bdynamic" ] ]
;

test-suite autodiff :
Expand Down
6 changes: 3 additions & 3 deletions test/compile_test/diff_lanczos_smoothing_incl_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@

void compile_and_link_test()
{
float f_temp;
float f_temp = 1;
boost::math::differentiation::discrete_lanczos_derivative f_lanczos(f_temp);
check_result<float>(f_lanczos.get_spacing());

double d_temp;
double d_temp = 1;
boost::math::differentiation::discrete_lanczos_derivative d_lanczos(d_temp);
check_result<double>(d_lanczos.get_spacing());

#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
long double ld_temp;
long double ld_temp = 1;
boost::math::differentiation::discrete_lanczos_derivative ld_lanczos(ld_temp);
check_result<long double>(ld_lanczos.get_spacing());
#endif
Expand Down
10 changes: 5 additions & 5 deletions test/exp_sinh_quadrature_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ BOOST_AUTO_TEST_CASE(exp_sinh_quadrature_test)
#endif
#endif
#endif
#if defined(TEST4) && !defined(BOOST_MATH_NO_MP_TESTS)
#if defined(TEST4) && defined(BOOST_MATH_RUN_MP_TESTS)
test_left_limit_infinite<cpp_bin_float_quad>();
test_right_limit_infinite<cpp_bin_float_quad>();
test_nr_examples<cpp_bin_float_quad>();
Expand All @@ -622,21 +622,21 @@ BOOST_AUTO_TEST_CASE(exp_sinh_quadrature_test)
test_crc<boost::math::concepts::real_concept>();
#endif
#endif
#if defined(TEST6) && !defined(BOOST_MATH_NO_MP_TESTS)
#if defined(TEST6) && defined(BOOST_MATH_RUN_MP_TESTS)
test_left_limit_infinite<boost::multiprecision::cpp_bin_float_50>();
test_right_limit_infinite<boost::multiprecision::cpp_bin_float_50>();
test_nr_examples<boost::multiprecision::cpp_bin_float_50>();
test_crc<boost::multiprecision::cpp_bin_float_50>();
#endif
#if defined(TEST7) && !defined(BOOST_MATH_NO_MP_TESTS)
#if defined(TEST7) && defined(BOOST_MATH_RUN_MP_TESTS)
test_left_limit_infinite<boost::multiprecision::cpp_dec_float_50>();
test_right_limit_infinite<boost::multiprecision::cpp_dec_float_50>();
test_nr_examples<boost::multiprecision::cpp_dec_float_50>();
//
// This one causes stack overflows on the CI machine, but not locally,
// assume it's due to restricted resources on the server, and <shrug> for now...
//
#if ! BOOST_WORKAROUND(BOOST_MSVC, == 1900) && !defined(BOOST_MATH_NO_MP_TESTS)
#if ! BOOST_WORKAROUND(BOOST_MSVC, == 1900) && defined(BOOST_MATH_RUN_MP_TESTS)
test_crc<boost::multiprecision::cpp_dec_float_50>();
#endif
#endif
Expand All @@ -656,7 +656,7 @@ BOOST_AUTO_TEST_CASE(exp_sinh_quadrature_test)
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
test_complex_exponential_integral_E1<std::complex<long double>>();
#endif
#ifndef BOOST_MATH_NO_MP_TESTS
#if defined(BOOST_MATH_RUN_MP_TESTS)
test_complex_exponential_integral_E1<boost::multiprecision::cpp_complex_quad>();
#endif
#endif
Expand Down
6 changes: 3 additions & 3 deletions test/gauss_kronrod_quadrature_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ BOOST_AUTO_TEST_CASE(gauss_quadrature_test)
test_complex_lambert_w<std::complex<long double>>();
#endif
#ifdef TEST1A
#if LDBL_MANT_DIG < 100 // If we have too many digits in a long double, we get build errors due to a constexpr issue.
#if LDBL_MANT_DIG < 100 && defined(BOOST_MATH_RUN_MP_TESTS) // If we have too many digits in a long double, we get build errors due to a constexpr issue.
std::cout << "Testing 21 point approximation:\n";
test_linear<cpp_bin_float_quad, 21>();
test_quadratic<cpp_bin_float_quad, 21>();
Expand All @@ -498,7 +498,7 @@ BOOST_AUTO_TEST_CASE(gauss_quadrature_test)
#endif
#endif
#ifdef TEST2
#if LDBL_MANT_DIG < 100 // If we have too many digits in a long double, we get build errors due to a constexpr issue.
#if LDBL_MANT_DIG < 100 && defined(BOOST_MATH_RUN_MP_TESTS) // If we have too many digits in a long double, we get build errors due to a constexpr issue.
std::cout << "Testing 41 point approximation:\n";
test_linear<cpp_bin_float_quad, 41>();
test_quadratic<cpp_bin_float_quad, 41>();
Expand All @@ -518,7 +518,7 @@ BOOST_AUTO_TEST_CASE(gauss_quadrature_test)
test_left_limit_infinite<cpp_bin_float_quad, 51>();
#endif
#endif
#ifdef TEST3
#if defined(TEST3) && defined(BOOST_MATH_RUN_MP_TESTS)
// Need at least one set of tests with expression templates turned on:
std::cout << "Testing 61 point approximation:\n";
test_linear<cpp_dec_float_50, 61>();
Expand Down
8 changes: 4 additions & 4 deletions test/gauss_quadrature_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ BOOST_AUTO_TEST_CASE(gauss_quadrature_test)
test_right_limit_infinite<double, 9>();
test_left_limit_infinite<double, 9>();

#if LDBL_MANT_DIG < 100
#if LDBL_MANT_DIG < 100 && defined(BOOST_MATH_RUN_MP_TESTS)
test_linear<cpp_bin_float_quad, 10>();
test_quadratic<cpp_bin_float_quad, 10>();
test_ca<cpp_bin_float_quad, 10>();
Expand All @@ -472,7 +472,7 @@ BOOST_AUTO_TEST_CASE(gauss_quadrature_test)
#endif
#endif
#ifdef TEST2
#if LDBL_MANT_DIG < 100
#if LDBL_MANT_DIG < 100 && defined(BOOST_MATH_RUN_MP_TESTS)
test_linear<cpp_bin_float_quad, 15>();
test_quadratic<cpp_bin_float_quad, 15>();
test_ca<cpp_bin_float_quad, 15>();
Expand Down Expand Up @@ -508,7 +508,7 @@ BOOST_AUTO_TEST_CASE(gauss_quadrature_test)
#endif
#endif
#ifdef TEST3
#if LDBL_MANT_DIG < 100
#if LDBL_MANT_DIG < 100 && defined(BOOST_MATH_RUN_MP_TESTS)
test_left_limit_infinite<cpp_bin_float_quad, 30>();
#endif
test_complex_lambert_w<std::complex<double>>();
Expand All @@ -517,7 +517,7 @@ BOOST_AUTO_TEST_CASE(gauss_quadrature_test)
test_left_limit_infinite<boost::multiprecision::float128, 30>();
test_complex_lambert_w<boost::multiprecision::complex128>();
#endif
#if LDBL_MANT_DIG < 100
#if LDBL_MANT_DIG < 100 && defined(BOOST_MATH_RUN_MP_TESTS)
test_complex_lambert_w<boost::multiprecision::cpp_complex_quad>();
#endif
#endif
Expand Down
10 changes: 10 additions & 0 deletions test/multiprc_concept_check_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
#define TEST_GROUP_1

#ifdef BOOST_MATH_RUN_MP_TESTS

#ifdef _MSC_VER
# pragma warning(disable:4800)
# pragma warning(disable:4512)
Expand All @@ -38,4 +40,12 @@ int main()
//BOOST_CONCEPT_ASSERT((boost::math::concepts::RealTypeConcept<test_type>));
}

#else

int main()
{
return 0;
}

#endif

9 changes: 9 additions & 0 deletions test/multiprc_concept_check_10.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
#define TEST_GROUP_15

#ifdef BOOST_MATH_RUN_MP_TESTS

#ifdef _MSC_VER
# pragma warning(disable:4800)
# pragma warning(disable:4512)
Expand Down Expand Up @@ -44,4 +46,11 @@ int main()
//BOOST_CONCEPT_ASSERT((boost::math::concepts::RealTypeConcept<test_type>));
}

#else

int main()
{
return 0;
}

#endif
9 changes: 9 additions & 0 deletions test/multiprc_concept_check_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
#define TEST_GROUP_9

#ifdef BOOST_MATH_RUN_MP_TESTS

#ifdef _MSC_VER
# pragma warning(disable:4800)
# pragma warning(disable:4512)
Expand Down Expand Up @@ -39,4 +41,11 @@ int main()
checker.constraints();
}

#else

int main()
{
return 0;
}

#endif
10 changes: 10 additions & 0 deletions test/multiprc_concept_check_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
//
#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
#define TEST_GROUP_4

#ifdef BOOST_MATH_RUN_MP_TESTS

#ifdef _MSC_VER
# pragma warning(disable:4800)
# pragma warning(disable:4512)
Expand Down Expand Up @@ -40,4 +43,11 @@ int main()
//BOOST_CONCEPT_ASSERT((boost::math::concepts::RealTypeConcept<test_type>));
}

#else

int main()
{
return 0;
}

#endif
9 changes: 9 additions & 0 deletions test/multiprc_concept_check_4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
#define TEST_GROUP_5

#ifdef BOOST_MATH_RUN_MP_TESTS

#ifdef _MSC_VER
# pragma warning(disable:4800)
# pragma warning(disable:4512)
Expand Down Expand Up @@ -44,4 +46,11 @@ int main()
//BOOST_CONCEPT_ASSERT((boost::math::concepts::RealTypeConcept<test_type>));
}

#else

int main()
{
return 0;
}

#endif
9 changes: 9 additions & 0 deletions test/multiprc_concept_check_5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
#define TEST_GROUP_6

#ifdef BOOST_MATH_RUN_MP_TESTS

#ifdef _MSC_VER
# pragma warning(disable:4800)
# pragma warning(disable:4512)
Expand Down Expand Up @@ -44,4 +46,11 @@ int main()
//BOOST_CONCEPT_ASSERT((boost::math::concepts::RealTypeConcept<test_type>));
}

#else

int main()
{
return 0;
}

#endif
9 changes: 9 additions & 0 deletions test/multiprc_concept_check_6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
#define TEST_GROUP_7

#ifdef BOOST_MATH_RUN_MP_TESTS

#ifdef _MSC_VER
# pragma warning(disable:4800)
# pragma warning(disable:4512)
Expand Down Expand Up @@ -44,4 +46,11 @@ int main()
//BOOST_CONCEPT_ASSERT((boost::math::concepts::RealTypeConcept<test_type>));
}

#else

int main()
{
return 0;
}

#endif
9 changes: 9 additions & 0 deletions test/multiprc_concept_check_7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
#define TEST_GROUP_12

#ifdef BOOST_MATH_RUN_MP_TESTS

#ifdef _MSC_VER
# pragma warning(disable:4800)
# pragma warning(disable:4512)
Expand Down Expand Up @@ -44,4 +46,11 @@ int main()
//BOOST_CONCEPT_ASSERT((boost::math::concepts::RealTypeConcept<test_type>));
}

#else

int main()
{
return 0;
}

#endif
9 changes: 9 additions & 0 deletions test/multiprc_concept_check_8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
#define TEST_GROUP_13

#ifdef BOOST_MATH_RUN_MP_TESTS

#ifdef _MSC_VER
# pragma warning(disable:4800)
# pragma warning(disable:4512)
Expand Down Expand Up @@ -44,4 +46,11 @@ int main()
//BOOST_CONCEPT_ASSERT((boost::math::concepts::RealTypeConcept<test_type>));
}

#else

int main()
{
return 0;
}

#endif
9 changes: 9 additions & 0 deletions test/multiprc_concept_check_9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
#define TEST_GROUP_14

#ifdef BOOST_MATH_RUN_MP_TESTS

#ifdef _MSC_VER
# pragma warning(disable:4800)
# pragma warning(disable:4512)
Expand Down Expand Up @@ -44,4 +46,11 @@ int main()
//BOOST_CONCEPT_ASSERT((boost::math::concepts::RealTypeConcept<test_type>));
}

#else

int main()
{
return 0;
}

#endif
6 changes: 4 additions & 2 deletions test/sinh_sinh_quadrature_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ BOOST_AUTO_TEST_CASE(sinh_sinh_quadrature_test)
#if !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) && !defined(BOOST_MATH_NO_REAL_CONCEPT_TESTS)
test_nr_examples<boost::math::concepts::real_concept>();
#endif
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1900)
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && defined(BOOST_MATH_RUN_MP_TESTS)
test_nr_examples<boost::multiprecision::cpp_dec_float_50>();
#endif

Expand All @@ -297,12 +297,14 @@ BOOST_AUTO_TEST_CASE(sinh_sinh_quadrature_test)
test_crc<long double>();
test_dirichlet_eta<std::complex<long double>>();
#endif
#ifdef BOOST_MATH_RUN_MP_TESTS
test_crc<cpp_bin_float_quad>();
test_dirichlet_eta<boost::multiprecision::cpp_complex_quad>();
#endif
#if !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) && !defined(BOOST_MATH_NO_REAL_CONCEPT_TESTS)
test_crc<boost::math::concepts::real_concept>();
#endif
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1900)
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && defined(BOOST_MATH_RUN_MP_TESTS)
test_crc<boost::multiprecision::cpp_dec_float_50>();
#endif

Expand Down
Loading

0 comments on commit 2fe1fac

Please sign in to comment.