From 12b3c8a7e7457a7c52ae5e97e298e3bc4b3fa4d2 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Thu, 22 Apr 2021 21:44:21 +0300 Subject: [PATCH] Standalone tests (#606) * Add missing distribution compile tests * Add cstdfloat compile tests * Rename and finish differentiation * Add interpolators compile tests and fixes * Reorganize/add quadrature compile tests * Add missing sf tests and fixes for failures * Add tools incl tests and fixes * Add compile tests to jamfile plus collected fixes * Collected fixes for CI failures * Fix fftw config * Remove lexical cast from arcsine dist [ci skip] * Improve cstdfloat tests [ci skip] * Improve differentiation tests [ci skip] * Improve distribution testing [ci skip] * Updates to interpolator tests [ci skip] * Improve quadrature tests [ci skip] * Improve sf tests [ci skip] * Improve tools tests * Collected CI fixes * Fix for MSVC 14.2 array allocation error [windows] * MSVC 14.2 workarounds [windows] * Fix float128 and interpolators tests * Add standalone testing on clang [standalone] * Fixes for type mismatches on MSVC [windows] * Fix for MSVC 14.0 fail from missing header [windows] * Change barycentric rational namespace [ci skip] * Fix standalone clang warnings * Change namespace in barycentric examples --- .github/workflows/ci.yml | 47 +++++++- .../barycentric_rational_interpolation.qbk | 8 +- example/barycentric_interpolation_example.cpp | 2 +- .../barycentric_interpolation_example_2.cpp | 2 +- .../boost/math/cstdfloat/cstdfloat_cmath.hpp | 2 + .../differentiation/lanczos_smoothing.hpp | 2 + include/boost/math/distributions/arcsine.hpp | 11 +- ...rical_cumulative_distribution_function.hpp | 2 + .../interpolators/barycentric_rational.hpp | 4 +- .../boost/math/interpolators/catmull_rom.hpp | 1 + .../detail/barycentric_rational_detail.hpp | 4 +- .../detail/cardinal_trigonometric_detail.hpp | 1 + .../detail/cubic_hermite_detail.hpp | 9 +- .../detail/quintic_hermite_detail.hpp | 1 + .../detail/septic_hermite_detail.hpp | 1 + .../vector_barycentric_rational_detail.hpp | 6 +- .../detail/whittaker_shannon_detail.hpp | 1 + .../vector_barycentric_rational.hpp | 4 +- include/boost/math/quadrature/gauss.hpp | 97 ++++++++-------- .../boost/math/quadrature/gauss_kronrod.hpp | 107 +++++++++--------- .../detail/bernoulli_details.hpp | 28 ++--- .../math/special_functions/fpclassify.hpp | 4 +- .../math/special_functions/gegenbauer.hpp | 1 + .../boost/math/special_functions/rsqrt.hpp | 2 + include/boost/math/tools/atomic.hpp | 7 +- .../tools/centered_continued_fraction.hpp | 6 +- .../boost/math/tools/cohen_acceleration.hpp | 5 +- .../boost/math/tools/condition_numbers.hpp | 1 + include/boost/math/tools/engel_expansion.hpp | 9 +- .../boost/math/tools/header_deprecated.hpp | 4 +- include/boost/math/tools/luroth_expansion.hpp | 10 +- include/boost/math/tools/norms.hpp | 1 + include/boost/math/tools/random_vector.hpp | 2 +- include/boost/math/tools/recurrence.hpp | 1 + .../math/tools/simple_continued_fraction.hpp | 2 + test/Jamfile.v2 | 93 +++++++++++---- test/compile_test/constants_incl_test.cpp | 2 +- .../cstdfloat_cmath_incl_test.cpp | 92 +++++++++++++++ .../cstdfloat_complex_incl_test.cpp | 47 ++++++++ .../cstdfloat_iostream_incl_test.cpp | 9 ++ .../cstdfloat_limits_incl_test.cpp | 51 +++++++++ .../cstdfloat_types_incl_test.cpp | 9 ++ ...l_test.cpp => diff_autodiff_incl_test.cpp} | 0 .../diff_finite_difference_incl_test.cpp | 29 +++++ .../diff_lanczos_smoothing_incl_test.cpp | 30 +++++ ...umerical_differentiation_concept_test.cpp} | 0 ...f_numerical_differentiation_incl_test.cpp} | 0 test/compile_test/dist_arcsine_incl_test.cpp | 25 ++++ ...pirical_cumulative_dist_func_incl_test.cpp | 23 ++++ .../compile_test/dist_geometric_incl_test.cpp | 25 ++++ .../dist_inv_gaussian_incl_test.cpp | 25 ++++ ...t.cpp => filters_daubechies_incl_test.cpp} | 0 ...ors_barycentric_rational_concept_test.cpp} | 2 +- ...lators_barycentric_rational_incl_test.cpp} | 2 +- .../interpolators_cardinal_trig_incl_test.cpp | 25 ++++ ...nterpolators_catmull_rom_concept_test.cpp} | 0 ...> interpolators_catmull_rom_incl_test.cpp} | 0 .../interpolators_cubic_hermite_incl_test.cpp | 26 +++++ ...terpolators_cubic_spline_concept_test.cpp} | 0 ... interpolators_cubic_spline_incl_test.cpp} | 0 .../interpolators_makima_incl_test.cpp | 26 +++++ .../interpolators_pchip_incl_test.cpp | 26 +++++ ...nterpolators_quintic_hermite_incl_test.cpp | 28 +++++ ...interpolators_septic_hermite_incl_test.cpp | 29 +++++ ..._vector_barycentric_rational_incl_test.cpp | 27 +++++ ...erpolators_whittaker_shannon_incl_test.cpp | 25 ++++ ...est.cpp => quad_exp_sinh_concept_test.cpp} | 0 ...l_test.cpp => quad_exp_sinh_incl_test.cpp} | 2 +- test/compile_test/quad_gauss_incl_test.cpp | 21 ++++ .../quad_gauss_kronrod_incl_test.cpp | 21 ++++ ...> quad_naive_monte_carlo_concept_test.cpp} | 0 ...p => quad_naive_monte_carlo_incl_test.cpp} | 0 ...quad_ooura_fourier_integrals_incl_test.cpp | 25 ++++ ...st.cpp => quad_sinh_sinh_concept_test.cpp} | 0 ..._test.cpp => quad_sinh_sinh_incl_test.cpp} | 4 +- ...st.cpp => quad_tanh_sinh_concept_test.cpp} | 0 ..._test.cpp => quad_tanh_sinh_incl_test.cpp} | 6 +- ....cpp => quad_trapezoidal_concept_test.cpp} | 0 ...est.cpp => quad_trapezoidal_incl_test.cpp} | 2 +- .../quad_wavelet_transforms_incl_test.cpp | 22 ++++ test/compile_test/sf_chebyshev_incl_test.cpp | 22 ++++ .../sf_chebyshev_transform_incl_test.cpp | 21 ++++ ...pp => sf_daubechies_scaling_incl_test.cpp} | 0 test/compile_test/sf_fibonacci_incl_test.cpp | 29 +++++ test/compile_test/sf_gegenbauer_incl_test.cpp | 35 ++++++ test/compile_test/sf_lambert_w_incl_test.cpp | 41 +++++++ .../sf_nonfinite_num_facets_incl_test.cpp | 9 ++ test/compile_test/sf_rsqrt_incl_test.cpp | 23 ++++ test/compile_test/sf_trigamma_incl_test.cpp | 23 ++++ test/compile_test/tools_agm_incl_test.cpp | 23 ++++ test/compile_test/tools_assert_incl_test.cpp | 9 ++ test/compile_test/tools_atomic_incl_test.cpp | 9 ++ .../tools_big_constant_incl_test.cpp | 11 ++ ..._centered_continued_fraction_incl_test.cpp | 28 +++++ .../tools_cohen_acceleration_incl_test.cpp | 43 +++++++ test/compile_test/tools_complex_incl_test.cpp | 9 ++ .../tools_condition_numbers_incl_test.cpp | 28 +++++ .../tools_convert_from_string_incl_test.cpp | 28 +++++ .../tools_cxx03_warn_incl_test.cpp | 9 ++ .../tools_engel_expansion_incl_test.cpp | 28 +++++ .../tools_header_deprecated_incl_test.cpp | 9 ++ .../tools_is_detected_incl_test.cpp | 9 ++ .../tools_lexical_cast_incl_test.cpp | 9 ++ .../tools_luroth_expansion_incl_test.cpp | 28 +++++ test/compile_test/tools_mp_incl_test.cpp | 13 +++ test/compile_test/tools_norms_incl_test.cpp | 9 ++ .../tools_polynomial_gcd_incl_test.cpp | 25 ++++ .../tools_promotion_incl_test.cpp | 9 ++ .../tools_random_vector_incl_test.cpp | 31 +++++ ...ls_simple_continued_fraction_incl_test.cpp | 28 +++++ .../tools_test_value_incl_test.cpp | 9 ++ .../tools_throw_exception_incl_test.cpp | 9 ++ test/compile_test/tools_traits_incl_test.cpp | 9 ++ .../tools_ulps_plot_incl_test.cpp | 21 ++++ .../tools_workaround_incl_test.cpp | 23 ++++ test/test_barycentric_rational.cpp | 16 +-- test/test_vector_barycentric_rational.cpp | 22 ++-- 117 files changed, 1669 insertions(+), 212 deletions(-) create mode 100644 test/compile_test/cstdfloat_cmath_incl_test.cpp create mode 100644 test/compile_test/cstdfloat_complex_incl_test.cpp create mode 100644 test/compile_test/cstdfloat_iostream_incl_test.cpp create mode 100644 test/compile_test/cstdfloat_limits_incl_test.cpp create mode 100644 test/compile_test/cstdfloat_types_incl_test.cpp rename test/compile_test/{autodiff_incl_test.cpp => diff_autodiff_incl_test.cpp} (100%) create mode 100644 test/compile_test/diff_finite_difference_incl_test.cpp create mode 100644 test/compile_test/diff_lanczos_smoothing_incl_test.cpp rename test/compile_test/{numerical_differentiation_concept_test.cpp => diff_numerical_differentiation_concept_test.cpp} (100%) rename test/compile_test/{numerical_differentiation_incl_test.cpp => diff_numerical_differentiation_incl_test.cpp} (100%) create mode 100644 test/compile_test/dist_arcsine_incl_test.cpp create mode 100644 test/compile_test/dist_empirical_cumulative_dist_func_incl_test.cpp create mode 100644 test/compile_test/dist_geometric_incl_test.cpp create mode 100644 test/compile_test/dist_inv_gaussian_incl_test.cpp rename test/compile_test/{daubechies_filters_incl_test.cpp => filters_daubechies_incl_test.cpp} (100%) rename test/compile_test/{barycentric_rational_concept_test.cpp => interpolators_barycentric_rational_concept_test.cpp} (83%) rename test/compile_test/{barycentric_rational_incl_test.cpp => interpolators_barycentric_rational_incl_test.cpp} (90%) create mode 100644 test/compile_test/interpolators_cardinal_trig_incl_test.cpp rename test/compile_test/{catmull_rom_concept_test.cpp => interpolators_catmull_rom_concept_test.cpp} (100%) rename test/compile_test/{catmull_rom_incl_test.cpp => interpolators_catmull_rom_incl_test.cpp} (100%) create mode 100644 test/compile_test/interpolators_cubic_hermite_incl_test.cpp rename test/compile_test/{cubic_spline_concept_test.cpp => interpolators_cubic_spline_concept_test.cpp} (100%) rename test/compile_test/{cubic_spline_incl_test.cpp => interpolators_cubic_spline_incl_test.cpp} (100%) create mode 100644 test/compile_test/interpolators_makima_incl_test.cpp create mode 100644 test/compile_test/interpolators_pchip_incl_test.cpp create mode 100644 test/compile_test/interpolators_quintic_hermite_incl_test.cpp create mode 100644 test/compile_test/interpolators_septic_hermite_incl_test.cpp create mode 100644 test/compile_test/interpolators_vector_barycentric_rational_incl_test.cpp create mode 100644 test/compile_test/interpolators_whittaker_shannon_incl_test.cpp rename test/compile_test/{exp_sinh_concept_test.cpp => quad_exp_sinh_concept_test.cpp} (100%) rename test/compile_test/{exp_sinh_incl_test.cpp => quad_exp_sinh_incl_test.cpp} (89%) create mode 100644 test/compile_test/quad_gauss_incl_test.cpp create mode 100644 test/compile_test/quad_gauss_kronrod_incl_test.cpp rename test/compile_test/{naive_monte_carlo_concept_test.cpp => quad_naive_monte_carlo_concept_test.cpp} (100%) rename test/compile_test/{naive_monte_carlo_incl_test.cpp => quad_naive_monte_carlo_incl_test.cpp} (100%) create mode 100644 test/compile_test/quad_ooura_fourier_integrals_incl_test.cpp rename test/compile_test/{sinh_sinh_concept_test.cpp => quad_sinh_sinh_concept_test.cpp} (100%) rename test/compile_test/{sinh_sinh_incl_test.cpp => quad_sinh_sinh_incl_test.cpp} (83%) rename test/compile_test/{tanh_sinh_concept_test.cpp => quad_tanh_sinh_concept_test.cpp} (100%) rename test/compile_test/{tanh_sinh_incl_test.cpp => quad_tanh_sinh_incl_test.cpp} (78%) rename test/compile_test/{trapezoidal_concept_test.cpp => quad_trapezoidal_concept_test.cpp} (100%) rename test/compile_test/{trapezoidal_incl_test.cpp => quad_trapezoidal_incl_test.cpp} (89%) create mode 100644 test/compile_test/quad_wavelet_transforms_incl_test.cpp create mode 100644 test/compile_test/sf_chebyshev_incl_test.cpp create mode 100644 test/compile_test/sf_chebyshev_transform_incl_test.cpp rename test/compile_test/{daubechies_scaling_incl_test.cpp => sf_daubechies_scaling_incl_test.cpp} (100%) create mode 100644 test/compile_test/sf_fibonacci_incl_test.cpp create mode 100644 test/compile_test/sf_gegenbauer_incl_test.cpp create mode 100644 test/compile_test/sf_lambert_w_incl_test.cpp create mode 100644 test/compile_test/sf_nonfinite_num_facets_incl_test.cpp create mode 100644 test/compile_test/sf_rsqrt_incl_test.cpp create mode 100644 test/compile_test/sf_trigamma_incl_test.cpp create mode 100644 test/compile_test/tools_agm_incl_test.cpp create mode 100644 test/compile_test/tools_assert_incl_test.cpp create mode 100644 test/compile_test/tools_atomic_incl_test.cpp create mode 100644 test/compile_test/tools_big_constant_incl_test.cpp create mode 100644 test/compile_test/tools_centered_continued_fraction_incl_test.cpp create mode 100644 test/compile_test/tools_cohen_acceleration_incl_test.cpp create mode 100644 test/compile_test/tools_complex_incl_test.cpp create mode 100644 test/compile_test/tools_condition_numbers_incl_test.cpp create mode 100644 test/compile_test/tools_convert_from_string_incl_test.cpp create mode 100644 test/compile_test/tools_cxx03_warn_incl_test.cpp create mode 100644 test/compile_test/tools_engel_expansion_incl_test.cpp create mode 100644 test/compile_test/tools_header_deprecated_incl_test.cpp create mode 100644 test/compile_test/tools_is_detected_incl_test.cpp create mode 100644 test/compile_test/tools_lexical_cast_incl_test.cpp create mode 100644 test/compile_test/tools_luroth_expansion_incl_test.cpp create mode 100644 test/compile_test/tools_mp_incl_test.cpp create mode 100644 test/compile_test/tools_norms_incl_test.cpp create mode 100644 test/compile_test/tools_polynomial_gcd_incl_test.cpp create mode 100644 test/compile_test/tools_promotion_incl_test.cpp create mode 100644 test/compile_test/tools_random_vector_incl_test.cpp create mode 100644 test/compile_test/tools_simple_continued_fraction_incl_test.cpp create mode 100644 test/compile_test/tools_test_value_incl_test.cpp create mode 100644 test/compile_test/tools_throw_exception_incl_test.cpp create mode 100644 test/compile_test/tools_traits_incl_test.cpp create mode 100644 test/compile_test/tools_ulps_plot_incl_test.cpp create mode 100644 test/compile_test/tools_workaround_incl_test.cpp diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 230b8b0ca..447e5587d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -296,7 +296,7 @@ jobs: - name: Test run: ..\..\..\b2 --hash %ARGS% define=CI_SUPPRESS_KNOWN_ISSUES ${{ matrix.suite }} working-directory: ../boost-root/libs/math/test - standalone: + standalone-gcc: runs-on: ubuntu-20.04 strategy: fail-fast: false @@ -324,7 +324,7 @@ jobs: if: steps.retry1.outcome=='failure' run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test" - name: Install packages - run: sudo apt install g++-10 + run: sudo apt install g++-10 libgmp-dev libmpfr-dev libfftw3-dev - name: Checkout main boost run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root - name: Update tools/boostdep @@ -339,3 +339,46 @@ jobs: - name: Run Compile Tests run: make -j$((`nproc`+1)) working-directory: ../boost-root/libs/math + standalone-clang: + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: '0' + - uses: mstachniuk/ci-skip@v1 + with: + commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]' + commit-filter-separator: ';' + fail-fast: true + - name: Add repository + continue-on-error: true + id: addrepo + run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test" + - name: Retry Add Repo + continue-on-error: true + id: retry1 + if: steps.addrepo.outcome=='failure' + run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test" + - name: Retry Add Repo 2 + continue-on-error: true + id: retry2 + if: steps.retry1.outcome=='failure' + run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test" + - name: Install packages + run: sudo apt install clang-10 libgmp-dev libmpfr-dev libfftw3-dev + - name: Checkout main boost + run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root + - name: Update tools/boostdep + run: git submodule update --init tools/boostdep + working-directory: ../boost-root + - name: Copy files + run: cp -r $GITHUB_WORKSPACE/* libs/math + working-directory: ../boost-root + - name: Run CMake + run: cmake -DBUILD_TESTING=1 -DCMAKE_CXX_COMPILER=clang++-10 . + working-directory: ../boost-root/libs/math + - name: Run Compile Tests + run: make -j$((`nproc`+1)) + working-directory: ../boost-root/libs/math diff --git a/doc/interpolators/barycentric_rational_interpolation.qbk b/doc/interpolators/barycentric_rational_interpolation.qbk index 217baca6a..d98951b7a 100644 --- a/doc/interpolators/barycentric_rational_interpolation.qbk +++ b/doc/interpolators/barycentric_rational_interpolation.qbk @@ -13,7 +13,7 @@ `` #include -namespace boost{ namespace math{ +namespace boost{ namespace math{ namespace interpolators{ template class barycentric_rational { @@ -34,7 +34,7 @@ namespace boost{ namespace math{ std::vector&& return_y(); }; -}} +}}} `` @@ -52,13 +52,13 @@ The call is trivial: std::vector x(500); std::vector y(500); // populate x, y, then: - boost::math::barycentric_rational interpolant(std::move(x), std::move(y)); + boost::math::interpolators::barycentric_rational interpolant(std::move(x), std::move(y)); This implicitly calls the constructor with approximation order 3, and hence the accuracy is [bigo](/h/[super 4]). In general, if you require an approximation order /d/, then the error is [bigo](/h/[super /d/+1]). A call to the constructor with an explicit approximation order is demonstrated below - boost::math::barycentric_rational interpolant(std::move(x), std::move(y), 5); + boost::math::interpolators::barycentric_rational interpolant(std::move(x), std::move(y), 5); To evaluate the interpolant, simply use diff --git a/example/barycentric_interpolation_example.cpp b/example/barycentric_interpolation_example.cpp index 263e20f19..2da3ad9e5 100644 --- a/example/barycentric_interpolation_example.cpp +++ b/example/barycentric_interpolation_example.cpp @@ -81,7 +81,7 @@ int main() //-> // Now we want to interpolate this potential at any r: - boost::math::barycentric_rational b(r.data(), mrV.data(), r.size()); + boost::math::interpolators::barycentric_rational b(r.data(), mrV.data(), r.size()); for (size_t i = 1; i < 8; ++i) { diff --git a/example/barycentric_interpolation_example_2.cpp b/example/barycentric_interpolation_example_2.cpp index aefea4ea8..23ba80ad7 100644 --- a/example/barycentric_interpolation_example_2.cpp +++ b/example/barycentric_interpolation_example_2.cpp @@ -76,7 +76,7 @@ int main() // start by creating 2 ranges for the x and y values: auto x_range = boost::adaptors::keys(r); auto y_range = boost::adaptors::values(r); - boost::math::barycentric_rational b(x_range.begin(), x_range.end(), y_range.begin()); + boost::math::interpolators::barycentric_rational b(x_range.begin(), x_range.end(), y_range.begin()); // // We'll use a lambda expression to provide the functor to our root finder, since we want // the abscissa value that yields 3, not zero. We pass the functor b by value to the diff --git a/include/boost/math/cstdfloat/cstdfloat_cmath.hpp b/include/boost/math/cstdfloat/cstdfloat_cmath.hpp index af9398ee6..6834ad3f4 100644 --- a/include/boost/math/cstdfloat/cstdfloat_cmath.hpp +++ b/include/boost/math/cstdfloat/cstdfloat_cmath.hpp @@ -879,7 +879,9 @@ namespace std using boost::math::cstdfloat::detail::fabs; #if !(defined(_GLIBCXX_USE_FLOAT128) && defined(__GNUC__) && (__GNUC__ >= 7)) +#if defined(__clang__) && !(!defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)) // workaround for clang using libstdc++ using boost::math::cstdfloat::detail::abs; +#endif #endif using boost::math::cstdfloat::detail::floor; diff --git a/include/boost/math/differentiation/lanczos_smoothing.hpp b/include/boost/math/differentiation/lanczos_smoothing.hpp index 7542b1cbb..4fc795455 100644 --- a/include/boost/math/differentiation/lanczos_smoothing.hpp +++ b/include/boost/math/differentiation/lanczos_smoothing.hpp @@ -6,10 +6,12 @@ #ifndef BOOST_MATH_DIFFERENTIATION_LANCZOS_SMOOTHING_HPP #define BOOST_MATH_DIFFERENTIATION_LANCZOS_SMOOTHING_HPP #include // for std::abs +#include #include // to nan initialize #include #include #include +#include #include namespace boost::math::differentiation { diff --git a/include/boost/math/distributions/arcsine.hpp b/include/boost/math/distributions/arcsine.hpp index 67b6642ea..952453f27 100644 --- a/include/boost/math/distributions/arcsine.hpp +++ b/include/boost/math/distributions/arcsine.hpp @@ -85,15 +85,14 @@ namespace boost { // Check x_min < x_max if (x_min >= x_max) { - std::string msg = "x_max argument is %1%, but must be > x_min = " + lexical_cast(x_min) + "!"; + std::string msg = "x_max argument is %1%, but must be > x_min"; *result = policies::raise_domain_error( function, msg.c_str(), x_max, pol); - // "x_max argument is %1%, but must be > x_min !", x_max, pol); - // "x_max argument is %1%, but must be > x_min %2!", x_max, x_min, pol); would be better. - // But would require replication of all helpers functions in /policies/error_handling.hpp for two values, - // as well as two value versions of raise_error, raise_domain_error and do_format ... - // so use slightly hacky lexical_cast to string instead. + // "x_max argument is %1%, but must be > x_min !", x_max, pol); + // "x_max argument is %1%, but must be > x_min %2!", x_max, x_min, pol); would be better. + // But would require replication of all helpers functions in /policies/error_handling.hpp for two values, + // as well as two value versions of raise_error, raise_domain_error and do_format return false; } return true; diff --git a/include/boost/math/distributions/empirical_cumulative_distribution_function.hpp b/include/boost/math/distributions/empirical_cumulative_distribution_function.hpp index 451bf2f20..d05dc46f1 100644 --- a/include/boost/math/distributions/empirical_cumulative_distribution_function.hpp +++ b/include/boost/math/distributions/empirical_cumulative_distribution_function.hpp @@ -8,6 +8,8 @@ #include #include #include +#include +#include namespace boost { namespace math{ diff --git a/include/boost/math/interpolators/barycentric_rational.hpp b/include/boost/math/interpolators/barycentric_rational.hpp index 4a2df01b4..5e89557b8 100644 --- a/include/boost/math/interpolators/barycentric_rational.hpp +++ b/include/boost/math/interpolators/barycentric_rational.hpp @@ -29,7 +29,7 @@ #include #include -namespace boost{ namespace math{ +namespace boost{ namespace math{ namespace interpolators{ template class barycentric_rational @@ -95,5 +95,5 @@ Real barycentric_rational::prime(Real x) const } -}} +}}} #endif diff --git a/include/boost/math/interpolators/catmull_rom.hpp b/include/boost/math/interpolators/catmull_rom.hpp index 14d686180..50c506c22 100644 --- a/include/boost/math/interpolators/catmull_rom.hpp +++ b/include/boost/math/interpolators/catmull_rom.hpp @@ -14,6 +14,7 @@ #include #include #include +#include namespace std_workaround { diff --git a/include/boost/math/interpolators/detail/barycentric_rational_detail.hpp b/include/boost/math/interpolators/detail/barycentric_rational_detail.hpp index cb1c4a3e6..4da19d3b5 100644 --- a/include/boost/math/interpolators/detail/barycentric_rational_detail.hpp +++ b/include/boost/math/interpolators/detail/barycentric_rational_detail.hpp @@ -15,7 +15,7 @@ #include #include -namespace boost{ namespace math{ namespace detail{ +namespace boost{ namespace math{ namespace interpolators { namespace detail{ template class barycentric_rational_imp @@ -210,5 +210,5 @@ Real barycentric_rational_imp::prime(Real x) const return numerator/denominator; } -}}} +}}}} #endif diff --git a/include/boost/math/interpolators/detail/cardinal_trigonometric_detail.hpp b/include/boost/math/interpolators/detail/cardinal_trigonometric_detail.hpp index e7b239ad9..30d96db06 100644 --- a/include/boost/math/interpolators/detail/cardinal_trigonometric_detail.hpp +++ b/include/boost/math/interpolators/detail/cardinal_trigonometric_detail.hpp @@ -5,6 +5,7 @@ #ifndef BOOST_MATH_INTERPOLATORS_DETAIL_CARDINAL_TRIGONOMETRIC_HPP #define BOOST_MATH_INTERPOLATORS_DETAIL_CARDINAL_TRIGONOMETRIC_HPP +#include #include #include #include diff --git a/include/boost/math/interpolators/detail/cubic_hermite_detail.hpp b/include/boost/math/interpolators/detail/cubic_hermite_detail.hpp index aa6eadca5..921902e1f 100644 --- a/include/boost/math/interpolators/detail/cubic_hermite_detail.hpp +++ b/include/boost/math/interpolators/detail/cubic_hermite_detail.hpp @@ -22,6 +22,7 @@ template class cubic_hermite_detail { public: using Real = typename RandomAccessContainer::value_type; + using Size = typename RandomAccessContainer::size_type; cubic_hermite_detail(RandomAccessContainer && x, RandomAccessContainer && y, RandomAccessContainer dydx) : x_{std::move(x)}, y_{std::move(y)}, dydx_{std::move(dydx)} @@ -148,7 +149,7 @@ public: return os; } - auto size() const + Size size() const { return x_.size(); } @@ -172,6 +173,7 @@ template class cardinal_cubic_hermite_detail { public: using Real = typename RandomAccessContainer::value_type; + using Size = typename RandomAccessContainer::size_type; cardinal_cubic_hermite_detail(RandomAccessContainer && y, RandomAccessContainer dydx, Real x0, Real dx) : y_{std::move(y)}, dy_{std::move(dydx)}, x0_{x0}, inv_dx_{1/dx} @@ -271,7 +273,7 @@ public: } - auto size() const + Size size() const { return y_.size(); } @@ -301,6 +303,7 @@ class cardinal_cubic_hermite_detail_aos { public: using Point = typename RandomAccessContainer::value_type; using Real = typename Point::value_type; + using Size = typename RandomAccessContainer::size_type; cardinal_cubic_hermite_detail_aos(RandomAccessContainer && dat, Real x0, Real dx) : dat_{std::move(dat)}, x0_{x0}, inv_dx_{1/dx} @@ -405,7 +408,7 @@ public: } - auto size() const + Size size() const { return dat_.size(); } diff --git a/include/boost/math/interpolators/detail/quintic_hermite_detail.hpp b/include/boost/math/interpolators/detail/quintic_hermite_detail.hpp index 18c7494d9..50c1b85ea 100644 --- a/include/boost/math/interpolators/detail/quintic_hermite_detail.hpp +++ b/include/boost/math/interpolators/detail/quintic_hermite_detail.hpp @@ -9,6 +9,7 @@ #include #include #include +#include #include namespace boost { diff --git a/include/boost/math/interpolators/detail/septic_hermite_detail.hpp b/include/boost/math/interpolators/detail/septic_hermite_detail.hpp index 65e9474d5..d9c251995 100644 --- a/include/boost/math/interpolators/detail/septic_hermite_detail.hpp +++ b/include/boost/math/interpolators/detail/septic_hermite_detail.hpp @@ -9,6 +9,7 @@ #include #include #include +#include #include namespace boost { diff --git a/include/boost/math/interpolators/detail/vector_barycentric_rational_detail.hpp b/include/boost/math/interpolators/detail/vector_barycentric_rational_detail.hpp index 98e5c915a..81fd2bde3 100644 --- a/include/boost/math/interpolators/detail/vector_barycentric_rational_detail.hpp +++ b/include/boost/math/interpolators/detail/vector_barycentric_rational_detail.hpp @@ -8,12 +8,14 @@ #ifndef BOOST_MATH_INTERPOLATORS_VECTOR_BARYCENTRIC_RATIONAL_DETAIL_HPP #define BOOST_MATH_INTERPOLATORS_VECTOR_BARYCENTRIC_RATIONAL_DETAIL_HPP +#include #include #include // for std::move #include +#include #include -namespace boost{ namespace math{ namespace detail{ +namespace boost{ namespace math{ namespace interpolators{ namespace detail{ template class vector_barycentric_rational_imp @@ -189,5 +191,5 @@ void vector_barycentric_rational_imp::eval_with_p return; } -}}} +}}}} #endif diff --git a/include/boost/math/interpolators/detail/whittaker_shannon_detail.hpp b/include/boost/math/interpolators/detail/whittaker_shannon_detail.hpp index 1df7b790d..58f2efccd 100644 --- a/include/boost/math/interpolators/detail/whittaker_shannon_detail.hpp +++ b/include/boost/math/interpolators/detail/whittaker_shannon_detail.hpp @@ -5,6 +5,7 @@ // or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MATH_INTERPOLATORS_WHITAKKER_SHANNON_DETAIL_HPP #define BOOST_MATH_INTERPOLATORS_WHITAKKER_SHANNON_DETAIL_HPP +#include #include #include #include diff --git a/include/boost/math/interpolators/vector_barycentric_rational.hpp b/include/boost/math/interpolators/vector_barycentric_rational.hpp index 8289799bc..1b899fbd5 100644 --- a/include/boost/math/interpolators/vector_barycentric_rational.hpp +++ b/include/boost/math/interpolators/vector_barycentric_rational.hpp @@ -15,7 +15,7 @@ #include #include -namespace boost{ namespace math{ +namespace boost{ namespace math{ namespace interpolators{ template class vector_barycentric_rational @@ -78,5 +78,5 @@ void vector_barycentric_rational::operator()(type return; } -}} +}}} #endif diff --git a/include/boost/math/quadrature/gauss.hpp b/include/boost/math/quadrature/gauss.hpp index 61ad57076..60992c526 100644 --- a/include/boost/math/quadrature/gauss.hpp +++ b/include/boost/math/quadrature/gauss.hpp @@ -10,6 +10,7 @@ #pragma once #endif +#include #include #include #include @@ -80,7 +81,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.000000000e+00f, 4.058451514e-01f, 7.415311856e-01f, @@ -90,7 +91,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 4.179591837e-01f, 3.818300505e-01f, 2.797053915e-01f, @@ -106,7 +107,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000e+00, 4.05845151377397167e-01, 7.41531185599394440e-01, @@ -116,7 +117,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 4.17959183673469388e-01, 3.81830050505118945e-01, 2.79705391489276668e-01, @@ -132,7 +133,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00L, 4.05845151377397166906606412076961463e-01L, 7.41531185599394439863864773280788407e-01L, @@ -142,7 +143,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 4.17959183673469387755102040816326531e-01L, 3.81830050505118944950369775488975134e-01L, 2.79705391489276667901467771423779582e-01L, @@ -158,7 +159,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00Q, 4.05845151377397166906606412076961463e-01Q, 7.41531185599394439863864773280788407e-01Q, @@ -168,7 +169,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 4.17959183673469387755102040816326531e-01Q, 3.81830050505118944950369775488975134e-01Q, 2.79705391489276667901467771423779582e-01Q, @@ -210,7 +211,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 1.488743390e-01f, 4.333953941e-01f, 6.794095683e-01f, @@ -221,7 +222,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 2.955242247e-01f, 2.692667193e-01f, 2.190863625e-01f, @@ -238,7 +239,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 1.48874338981631211e-01, 4.33395394129247191e-01, 6.79409568299024406e-01, @@ -249,7 +250,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 2.95524224714752870e-01, 2.69266719309996355e-01, 2.19086362515982044e-01, @@ -266,7 +267,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 1.48874338981631210884826001129719985e-01L, 4.33395394129247190799265943165784162e-01L, 6.79409568299024406234327365114873576e-01L, @@ -277,7 +278,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 2.95524224714752870173892994651338329e-01L, 2.69266719309996355091226921569469353e-01L, 2.19086362515982043995534934228163192e-01L, @@ -294,7 +295,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 1.48874338981631210884826001129719985e-01Q, 4.33395394129247190799265943165784162e-01Q, 6.79409568299024406234327365114873576e-01Q, @@ -305,7 +306,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 2.95524224714752870173892994651338329e-01Q, 2.69266719309996355091226921569469353e-01Q, 2.19086362515982043995534934228163192e-01Q, @@ -350,7 +351,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.000000000e+00f, 2.011940940e-01f, 3.941513471e-01f, @@ -364,7 +365,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 2.025782419e-01f, 1.984314853e-01f, 1.861610000e-01f, @@ -384,7 +385,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000e+00, 2.01194093997434522e-01, 3.94151347077563370e-01, @@ -398,7 +399,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 2.02578241925561273e-01, 1.98431485327111576e-01, 1.86161000015562211e-01, @@ -418,7 +419,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00L, 2.01194093997434522300628303394596208e-01L, 3.94151347077563369897207370981045468e-01L, @@ -432,7 +433,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 2.02578241925561272880620199967519315e-01L, 1.98431485327111576456118326443839325e-01L, 1.86161000015562211026800561866422825e-01L, @@ -452,7 +453,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00Q, 2.01194093997434522300628303394596208e-01Q, 3.94151347077563369897207370981045468e-01Q, @@ -466,7 +467,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 2.02578241925561272880620199967519315e-01Q, 1.98431485327111576456118326443839325e-01Q, 1.86161000015562211026800561866422825e-01Q, @@ -520,7 +521,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 7.652652113e-02f, 2.277858511e-01f, 3.737060887e-01f, @@ -536,7 +537,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.527533871e-01f, 1.491729865e-01f, 1.420961093e-01f, @@ -558,7 +559,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 7.65265211334973338e-02, 2.27785851141645078e-01, 3.73706088715419561e-01, @@ -574,7 +575,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.52753387130725851e-01, 1.49172986472603747e-01, 1.42096109318382051e-01, @@ -596,7 +597,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 7.65265211334973337546404093988382110e-02L, 2.27785851141645078080496195368574625e-01L, 3.73706088715419560672548177024927237e-01L, @@ -612,7 +613,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.52753387130725850698084331955097593e-01L, 1.49172986472603746787828737001969437e-01L, 1.42096109318382051329298325067164933e-01L, @@ -634,7 +635,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 7.65265211334973337546404093988382110e-02Q, 2.27785851141645078080496195368574625e-01Q, 3.73706088715419560672548177024927237e-01Q, @@ -650,7 +651,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.52753387130725850698084331955097593e-01Q, 1.49172986472603746787828737001969437e-01Q, 1.42096109318382051329298325067164933e-01Q, @@ -710,7 +711,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.000000000e+00f, 1.228646926e-01f, 2.438668837e-01f, @@ -729,7 +730,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.231760537e-01f, 1.222424430e-01f, 1.194557635e-01f, @@ -754,7 +755,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000e+00, 1.22864692610710396e-01, 2.43866883720988432e-01, @@ -773,7 +774,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.23176053726715451e-01, 1.22242442990310042e-01, 1.19455763535784772e-01, @@ -798,7 +799,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00L, 1.22864692610710396387359818808036806e-01L, 2.43866883720988432045190362797451586e-01L, @@ -817,7 +818,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.23176053726715451203902873079050142e-01L, 1.22242442990310041688959518945851506e-01L, 1.19455763535784772228178126512901047e-01L, @@ -842,7 +843,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00Q, 1.22864692610710396387359818808036806e-01Q, 2.43866883720988432045190362797451586e-01Q, @@ -861,7 +862,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.23176053726715451203902873079050142e-01Q, 1.22242442990310041688959518945851506e-01Q, 1.19455763535784772228178126512901047e-01Q, @@ -930,7 +931,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 5.147184256e-02f, 1.538699136e-01f, 2.546369262e-01f, @@ -951,7 +952,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.028526529e-01f, 1.017623897e-01f, 9.959342059e-02f, @@ -978,7 +979,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 5.14718425553176958e-02, 1.53869913608583547e-01, 2.54636926167889846e-01, @@ -999,7 +1000,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.02852652893558840e-01, 1.01762389748405505e-01, 9.95934205867952671e-02, @@ -1026,7 +1027,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 5.14718425553176958330252131667225737e-02L, 1.53869913608583546963794672743255920e-01L, 2.54636926167889846439805129817805108e-01L, @@ -1047,7 +1048,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.02852652893558840341285636705415044e-01L, 1.01762389748405504596428952168554045e-01L, 9.95934205867952670627802821035694765e-02L, @@ -1074,7 +1075,7 @@ class gauss_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 5.14718425553176958330252131667225737e-02Q, 1.53869913608583546963794672743255920e-01Q, 2.54636926167889846439805129817805108e-01Q, @@ -1095,7 +1096,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.02852652893558840341285636705415044e-01Q, 1.01762389748405504596428952168554045e-01Q, 9.95934205867952670627802821035694765e-02Q, diff --git a/include/boost/math/quadrature/gauss_kronrod.hpp b/include/boost/math/quadrature/gauss_kronrod.hpp index 3deeb8bef..0a20cbf2b 100644 --- a/include/boost/math/quadrature/gauss_kronrod.hpp +++ b/include/boost/math/quadrature/gauss_kronrod.hpp @@ -1,5 +1,5 @@ // Copyright John Maddock 2017. -// Copyright Nick Thompson 2017. +// Copyright Nick Thompson 2017. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -13,7 +13,9 @@ #pragma warning(disable: 4127) #endif +#include #include +#include #include #include #include @@ -86,7 +88,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.000000000e+00f, 2.077849550e-01f, 4.058451514e-01f, @@ -100,7 +102,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 2.094821411e-01f, 2.044329401e-01f, 1.903505781e-01f, @@ -120,7 +122,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000e+00, 2.07784955007898468e-01, 4.05845151377397167e-01, @@ -134,7 +136,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 2.09482141084727828e-01, 2.04432940075298892e-01, 1.90350578064785410e-01, @@ -154,7 +156,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00L, 2.07784955007898467600689403773244913e-01L, 4.05845151377397166906606412076961463e-01L, @@ -168,7 +170,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 2.09482141084727828012999174891714264e-01L, 2.04432940075298892414161999234649085e-01L, 1.90350578064785409913256402421013683e-01L, @@ -189,7 +191,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00Q, 2.07784955007898467600689403773244913e-01Q, 4.05845151377397166906606412076961463e-01Q, @@ -203,7 +205,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 2.09482141084727828012999174891714264e-01Q, 2.04432940075298892414161999234649085e-01Q, 1.90350578064785409913256402421013683e-01Q, @@ -258,7 +260,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.000000000e+00f, 1.488743390e-01f, 2.943928627e-01f, @@ -275,7 +277,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.494455540e-01f, 1.477391049e-01f, 1.427759386e-01f, @@ -298,7 +300,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000e+00, 1.48874338981631211e-01, 2.94392862701460198e-01, @@ -315,7 +317,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.49445554002916906e-01, 1.47739104901338491e-01, 1.42775938577060081e-01, @@ -338,7 +340,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00L, 1.48874338981631210884826001129719985e-01L, 2.94392862701460198131126603103865566e-01L, @@ -355,7 +357,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.49445554002916905664936468389821204e-01L, 1.47739104901338491374841515972068046e-01L, 1.42775938577060080797094273138717061e-01L, @@ -379,7 +381,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00Q, 1.48874338981631210884826001129719985e-01Q, 2.94392862701460198131126603103865566e-01Q, @@ -396,7 +398,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.49445554002916905664936468389821204e-01Q, 1.47739104901338491374841515972068046e-01Q, 1.42775938577060080797094273138717061e-01Q, @@ -460,7 +462,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.000000000e+00f, 1.011420669e-01f, 2.011940940e-01f, @@ -482,7 +484,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.013300070e-01f, 1.007698455e-01f, 9.917359872e-02f, @@ -510,7 +512,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000e+00, 1.01142066918717499e-01, 2.01194093997434522e-01, @@ -532,7 +534,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.01330007014791549e-01, 1.00769845523875595e-01, 9.91735987217919593e-02, @@ -560,7 +562,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00L, 1.01142066918717499027074231447392339e-01L, 2.01194093997434522300628303394596208e-01L, @@ -582,7 +584,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.01330007014791549017374792767492547e-01L, 1.00769845523875595044946662617569722e-01L, 9.91735987217919593323931734846031311e-02L, @@ -611,7 +613,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00Q, 1.01142066918717499027074231447392339e-01Q, 2.01194093997434522300628303394596208e-01Q, @@ -633,7 +635,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 1.01330007014791549017374792767492547e-01Q, 1.00769845523875595044946662617569722e-01Q, 9.91735987217919593323931734846031311e-02Q, @@ -712,7 +714,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.000000000e+00f, 7.652652113e-02f, 1.526054652e-01f, @@ -739,7 +741,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 7.660071192e-02f, 7.637786767e-02f, 7.570449768e-02f, @@ -772,7 +774,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000e+00, 7.65265211334973338e-02, 1.52605465240922676e-01, @@ -799,7 +801,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 7.66007119179996564e-02, 7.63778676720807367e-02, 7.57044976845566747e-02, @@ -832,7 +834,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00L, 7.65265211334973337546404093988382110e-02L, 1.52605465240922675505220241022677528e-01L, @@ -859,7 +861,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 7.66007119179996564450499015301017408e-02L, 7.63778676720807367055028350380610018e-02L, 7.57044976845566746595427753766165583e-02L, @@ -893,18 +895,13 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00Q, 7.65265211334973337546404093988382110e-02Q, 1.52605465240922675505220241022677528e-01Q, 2.27785851141645078080496195368574625e-01Q, 3.01627868114913004320555356858592261e-01Q, - 3.73706088715419560672548177024927237e-01Q, - 4.43593175238725103199992213492640108e-01Q, - 5.10867001950827098004364050955250998e-01Q, - 5.75140446819710315342946036586425133e-01Q, - 6.36053680726515025452836696226285937e-01Q, - 6.93237656334751384805490711845931533e-01Q, + 3.73706088715419560672548177024927237e-01Q,array 7.46331906460150792614305070355641590e-01Q, 7.95041428837551198350638833272787943e-01Q, 8.39116971822218823394529061701520685e-01Q, @@ -920,7 +917,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 7.66007119179996564450499015301017408e-02Q, 7.63778676720807367055028350380610018e-02Q, 7.57044976845566746595427753766165583e-02Q, @@ -1014,7 +1011,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.000000000e+00f, 6.154448301e-02f, 1.228646926e-01f, @@ -1046,7 +1043,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 6.158081807e-02f, 6.147118987e-02f, 6.112850972e-02f, @@ -1084,7 +1081,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000e+00, 6.15444830056850789e-02, 1.22864692610710396e-01, @@ -1116,7 +1113,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 6.15808180678329351e-02, 6.14711898714253167e-02, 6.11285097170530483e-02, @@ -1154,7 +1151,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00L, 6.15444830056850788865463923667966313e-02L, 1.22864692610710396387359818808036806e-01L, @@ -1186,7 +1183,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 6.15808180678329350787598242400645532e-02L, 6.14711898714253166615441319652641776e-02L, 6.11285097170530483058590304162927119e-02L, @@ -1225,7 +1222,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00Q, 6.15444830056850788865463923667966313e-02Q, 1.22864692610710396387359818808036806e-01Q, @@ -1257,7 +1254,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 6.15808180678329350787598242400645532e-02Q, 6.14711898714253166615441319652641776e-02Q, 6.11285097170530483058590304162927119e-02Q, @@ -1366,7 +1363,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.000000000e+00f, 5.147184256e-02f, 1.028069380e-01f, @@ -1403,7 +1400,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 5.149472943e-02f, 5.142612854e-02f, 5.122154785e-02f, @@ -1446,7 +1443,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000e+00, 5.14718425553176958e-02, 1.02806937966737030e-01, @@ -1483,7 +1480,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 5.14947294294515676e-02, 5.14261285374590259e-02, 5.12215478492587722e-02, @@ -1526,7 +1523,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00L, 5.14718425553176958330252131667225737e-02L, 1.02806937966737030147096751318000592e-01L, @@ -1563,7 +1560,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 5.14947294294515675583404336470993075e-02L, 5.14261285374590259338628792157812598e-02L, 5.12215478492587721706562826049442083e-02L, @@ -1607,7 +1604,7 @@ class gauss_kronrod_detail public: static std::array const & abscissa() { - static const std::array data = { + static constexpr std::array data = { 0.00000000000000000000000000000000000e+00Q, 5.14718425553176958330252131667225737e-02Q, 1.02806937966737030147096751318000592e-01Q, @@ -1644,7 +1641,7 @@ public: } static std::array const & weights() { - static const std::array data = { + static constexpr std::array data = { 5.14947294294515675583404336470993075e-02Q, 5.14261285374590259338628792157812598e-02Q, 5.12215478492587721706562826049442083e-02Q, diff --git a/include/boost/math/special_functions/detail/bernoulli_details.hpp b/include/boost/math/special_functions/detail/bernoulli_details.hpp index 7c60c1eac..41e379b1f 100644 --- a/include/boost/math/special_functions/detail/bernoulli_details.hpp +++ b/include/boost/math/special_functions/detail/bernoulli_details.hpp @@ -362,20 +362,20 @@ public: // // Get the counter and see if we need to calculate more constants: // - if((static_cast(m_counter.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < start + n) - || (static_cast(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits())) + if((static_cast(m_counter.load(std::memory_order_consume)) < start + n) + || (static_cast(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits())) { std::lock_guard l(m_mutex); - if((static_cast(m_counter.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < start + n) - || (static_cast(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits())) + if((static_cast(m_counter.load(std::memory_order_consume)) < start + n) + || (static_cast(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits())) { - if(static_cast(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits()) + if(static_cast(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits()) { bn.clear(); tn.clear(); m_intermediates.clear(); - m_counter.store(0, BOOST_MATH_ATOMIC_NS::memory_order_release); + m_counter.store(0, std::memory_order_release); m_current_precision = boost::math::tools::digits(); } if(start + n >= bn.size()) @@ -383,7 +383,7 @@ public: std::size_t new_size = (std::min)((std::max)((std::max)(std::size_t(start + n), std::size_t(bn.size() + 20)), std::size_t(50)), std::size_t(bn.capacity())); tangent_numbers_series(new_size); } - m_counter.store(static_cast(bn.size()), BOOST_MATH_ATOMIC_NS::memory_order_release); + m_counter.store(static_cast(bn.size()), std::memory_order_release); } } @@ -441,20 +441,20 @@ public: // // Get the counter and see if we need to calculate more constants: // - if((static_cast(m_counter.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < start + n) - || (static_cast(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits())) + if((static_cast(m_counter.load(std::memory_order_consume)) < start + n) + || (static_cast(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits())) { std::lock_guard l(m_mutex); - if((static_cast(m_counter.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < start + n) - || (static_cast(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits())) + if((static_cast(m_counter.load(std::memory_order_consume)) < start + n) + || (static_cast(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits())) { - if(static_cast(m_current_precision.load(BOOST_MATH_ATOMIC_NS::memory_order_consume)) < boost::math::tools::digits()) + if(static_cast(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits()) { bn.clear(); tn.clear(); m_intermediates.clear(); - m_counter.store(0, BOOST_MATH_ATOMIC_NS::memory_order_release); + m_counter.store(0, std::memory_order_release); m_current_precision = boost::math::tools::digits(); } if(start + n >= bn.size()) @@ -462,7 +462,7 @@ public: std::size_t new_size = (std::min)((std::max)((std::max)(start + n, std::size_t(bn.size() + 20)), std::size_t(50)), std::size_t(bn.capacity())); tangent_numbers_series(new_size); } - m_counter.store(static_cast(bn.size()), BOOST_MATH_ATOMIC_NS::memory_order_release); + m_counter.store(static_cast(bn.size()), std::memory_order_release); } } diff --git a/include/boost/math/special_functions/fpclassify.hpp b/include/boost/math/special_functions/fpclassify.hpp index ad75bc8d1..09fcf2924 100644 --- a/include/boost/math/special_functions/fpclassify.hpp +++ b/include/boost/math/special_functions/fpclassify.hpp @@ -137,8 +137,8 @@ inline bool is_nan_helper(__float128 f, const std::false_type&) { return ::isnan inline bool is_nan_helper(__float128 f, const std::true_type&) { return std::isnan(static_cast(f)); } inline bool is_nan_helper(__float128 f, const std::false_type&) { return std::isnan(static_cast(f)); } #else -inline bool is_nan_helper(__float128 f, const std::true_type&) { return ::isnan(static_cast(f)); } -inline bool is_nan_helper(__float128 f, const std::false_type&) { return ::isnan(static_cast(f)); } +inline bool is_nan_helper(__float128 f, const std::true_type&) { return boost::math::isnan(static_cast(f)); } +inline bool is_nan_helper(__float128 f, const std::false_type&) { return boost::math::isnan(static_cast(f)); } #endif #endif } diff --git a/include/boost/math/special_functions/gegenbauer.hpp b/include/boost/math/special_functions/gegenbauer.hpp index d7fe039d4..60a684997 100644 --- a/include/boost/math/special_functions/gegenbauer.hpp +++ b/include/boost/math/special_functions/gegenbauer.hpp @@ -6,6 +6,7 @@ #ifndef BOOST_MATH_SPECIAL_GEGENBAUER_HPP #define BOOST_MATH_SPECIAL_GEGENBAUER_HPP +#include #include #include diff --git a/include/boost/math/special_functions/rsqrt.hpp b/include/boost/math/special_functions/rsqrt.hpp index 8b1ba0986..3b8be8235 100644 --- a/include/boost/math/special_functions/rsqrt.hpp +++ b/include/boost/math/special_functions/rsqrt.hpp @@ -6,6 +6,8 @@ #ifndef BOOST_MATH_SPECIAL_FUNCTIONS_RSQRT_HPP #define BOOST_MATH_SPECIAL_FUNCTIONS_RSQRT_HPP #include +#include +#include namespace boost::math { diff --git a/include/boost/math/tools/atomic.hpp b/include/boost/math/tools/atomic.hpp index 4ea3c1d85..3381e6e86 100644 --- a/include/boost/math/tools/atomic.hpp +++ b/include/boost/math/tools/atomic.hpp @@ -10,7 +10,7 @@ #include #include -#define BOOST_MATH_ATOMIC_NS std + namespace boost { namespace math { namespace detail { @@ -37,7 +37,8 @@ namespace boost { #else # define BOOST_MATH_NO_ATOMIC_INT #endif - } - }} + } // Namespace detail + } // Namespace math +} // Namespace boost #endif // BOOST_MATH_ATOMIC_DETAIL_HPP diff --git a/include/boost/math/tools/centered_continued_fraction.hpp b/include/boost/math/tools/centered_continued_fraction.hpp index 04c2b563d..6c23fa423 100644 --- a/include/boost/math/tools/centered_continued_fraction.hpp +++ b/include/boost/math/tools/centered_continued_fraction.hpp @@ -6,12 +6,16 @@ #ifndef BOOST_MATH_TOOLS_CENTERED_CONTINUED_FRACTION_HPP #define BOOST_MATH_TOOLS_CENTERED_CONTINUED_FRACTION_HPP +#include +#include #include #include #include -#include #include #include +#include +#include +#include #ifndef BOOST_MATH_STANDALONE #include diff --git a/include/boost/math/tools/cohen_acceleration.hpp b/include/boost/math/tools/cohen_acceleration.hpp index 397fda13f..e95fe3df8 100644 --- a/include/boost/math/tools/cohen_acceleration.hpp +++ b/include/boost/math/tools/cohen_acceleration.hpp @@ -7,13 +7,14 @@ #define BOOST_MATH_TOOLS_COHEN_ACCELERATION_HPP #include #include +#include namespace boost::math::tools { // Algorithm 1 of https://people.mpim-bonn.mpg.de/zagier/files/exp-math-9/fulltext.pdf // Convergence Acceleration of Alternating Series: Henri Cohen, Fernando Rodriguez Villegas, and Don Zagier template -auto cohen_acceleration(G& generator, int64_t n = -1) +auto cohen_acceleration(G& generator, std::int64_t n = -1) { using Real = decltype(generator()); // This test doesn't pass for float128, sad! @@ -28,7 +29,7 @@ auto cohen_acceleration(G& generator, int64_t n = -1) // relative error grows as 2*5.828^-n; take 5.828^-n < eps/4 => -nln(5.828) < ln(eps/4) => n > ln(4/eps)/ln(5.828). // Is there a way to do it rapidly with std::log2? (Yes, of course; but for primitive types it's computed at compile-time anyway.) n_ = ceil(log(4/std::numeric_limits::epsilon())*0.5672963285532555); - n = static_cast(n_); + n = static_cast(n_); } // d can get huge and overflow if you pick n too large: Real d = pow(3 + sqrt(Real(8)), n); diff --git a/include/boost/math/tools/condition_numbers.hpp b/include/boost/math/tools/condition_numbers.hpp index 66ef66575..a5801996a 100644 --- a/include/boost/math/tools/condition_numbers.hpp +++ b/include/boost/math/tools/condition_numbers.hpp @@ -6,6 +6,7 @@ #ifndef BOOST_MATH_TOOLS_CONDITION_NUMBERS_HPP #define BOOST_MATH_TOOLS_CONDITION_NUMBERS_HPP #include +#include #include namespace boost::math::tools { diff --git a/include/boost/math/tools/engel_expansion.hpp b/include/boost/math/tools/engel_expansion.hpp index edace66a1..643d469de 100644 --- a/include/boost/math/tools/engel_expansion.hpp +++ b/include/boost/math/tools/engel_expansion.hpp @@ -6,10 +6,11 @@ #ifndef BOOST_MATH_TOOLS_ENGEL_EXPANSION_HPP #define BOOST_MATH_TOOLS_ENGEL_EXPANSION_HPP +#include +#include #include #include #include -#include #include #include @@ -56,15 +57,15 @@ public: computed += term; } - for (size_t i = 1; i < a_.size(); ++i) + for (size_t j = 1; j < a_.size(); ++j) { // Sanity check: This should only happen when wraparound occurs: - if (a_[i] < a_[i-1]) + if (a_[j] < a_[j-1]) { throw std::domain_error("The digits of an Engel expansion must form a non-decreasing sequence; consider increasing the wide of the integer type."); } // Watch out for saturating behavior: - if (a_[i] == (std::numeric_limits::max)()) + if (a_[j] == (std::numeric_limits::max)()) { throw std::domain_error("The integer type Z does not have enough width to hold the terms of the Engel expansion; please widen the type."); } diff --git a/include/boost/math/tools/header_deprecated.hpp b/include/boost/math/tools/header_deprecated.hpp index 0283be059..8f4a5db25 100644 --- a/include/boost/math/tools/header_deprecated.hpp +++ b/include/boost/math/tools/header_deprecated.hpp @@ -8,10 +8,10 @@ #ifdef _MSC_VER // Expands to "This header is deprecated; use expr instead." -#define BOOST_MATH_HEADER_DEPRECATED(expr) #prama message("This header is deprecated; use " expr " instead.") +#define BOOST_MATH_HEADER_DEPRECATED(expr) __pragma("This header is deprecated; use " expr " instead.") #else // GNU, Clang, Intel, IBM, etc. // Expands to "This header is deprecated; use expr instead." -#define BOOST_MATH_HEADER_DEPRECATED(expr) #warning "This header is deprecated; use " expr " instead." +#define BOOST_MATH_HEADER_DEPRECATED(expr) _Pragma("This header is deprecated; use " expr " instead.") #endif #endif // BOOST_MATH_TOOLS_HEADER_DEPRECATED diff --git a/include/boost/math/tools/luroth_expansion.hpp b/include/boost/math/tools/luroth_expansion.hpp index a29e49eb6..7fb486b86 100644 --- a/include/boost/math/tools/luroth_expansion.hpp +++ b/include/boost/math/tools/luroth_expansion.hpp @@ -29,17 +29,17 @@ public: throw std::domain_error("Cannot convert non-finites into a Luroth representation."); } d_.reserve(50); - Real dn = floor(x); - d_.push_back(static_cast(dn)); - if (dn == x) + Real dn1 = floor(x); + d_.push_back(static_cast(dn1)); + if (dn1 == x) { d_.shrink_to_fit(); return; } // This attempts to follow the notation of: // "Khinchine's constant for Luroth Representation", by Sophia Kalpazidou. - x = x - dn; - Real computed = dn; + x = x - dn1; + Real computed = dn1; Real prod = 1; // Let the error bound grow by 1 ULP/iteration. // I haven't done the error analysis to show that this is an expected rate of error growth, diff --git a/include/boost/math/tools/norms.hpp b/include/boost/math/tools/norms.hpp index 7e0cd9777..7ed1598f9 100644 --- a/include/boost/math/tools/norms.hpp +++ b/include/boost/math/tools/norms.hpp @@ -7,6 +7,7 @@ #define BOOST_MATH_TOOLS_NORMS_HPP #include #include +#include #include #include #include diff --git a/include/boost/math/tools/random_vector.hpp b/include/boost/math/tools/random_vector.hpp index 37be07d71..e92f27f6f 100644 --- a/include/boost/math/tools/random_vector.hpp +++ b/include/boost/math/tools/random_vector.hpp @@ -56,4 +56,4 @@ std::vector generate_random_vector(std::size_t size, std::size_t seed) return v; } -}} // Namesapces +}} // Namespaces diff --git a/include/boost/math/tools/recurrence.hpp b/include/boost/math/tools/recurrence.hpp index 1d0bb282f..9c6badac5 100644 --- a/include/boost/math/tools/recurrence.hpp +++ b/include/boost/math/tools/recurrence.hpp @@ -11,6 +11,7 @@ #include #include #include +#include namespace boost { namespace math { diff --git a/include/boost/math/tools/simple_continued_fraction.hpp b/include/boost/math/tools/simple_continued_fraction.hpp index dc36ed598..af411c17d 100644 --- a/include/boost/math/tools/simple_continued_fraction.hpp +++ b/include/boost/math/tools/simple_continued_fraction.hpp @@ -6,12 +6,14 @@ #ifndef BOOST_MATH_TOOLS_SIMPLE_CONTINUED_FRACTION_HPP #define BOOST_MATH_TOOLS_SIMPLE_CONTINUED_FRACTION_HPP +#include #include #include #include #include #include #include +#include #ifndef BOOST_MATH_STANDALONE #include diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 2b51e4031..7bf87be7a 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -834,6 +834,9 @@ test-suite distribution_tests : [ run compile_test/dist_uniform_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/dist_weibull_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/distribution_concept_check.cpp : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ run compile_test/dist_arcsine_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/dist_empirical_cumulative_dist_func_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ run compile_test/dist_inv_gaussian_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run test_legacy_nonfinite.cpp ../../test/build//boost_unit_test_framework ] [ run test_basic_nonfinite.cpp ../../test/build//boost_unit_test_framework ] @@ -977,8 +980,15 @@ test-suite misc : [ run test_root_iterations.cpp pch ../../test/build//boost_unit_test_framework : : : [ requires cxx11_hdr_tuple ] ] [ run test_root_finding_concepts.cpp ../../test/build//boost_unit_test_framework ] [ run test_toms748_solve.cpp pch ../../test/build//boost_unit_test_framework ] - [ run compile_test/cubic_spline_incl_test.cpp compile_test_main : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] - [ run compile_test/barycentric_rational_incl_test.cpp compile_test_main : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ run compile_test/interpolators_cubic_spline_incl_test.cpp compile_test_main : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ run compile_test/interpolators_barycentric_rational_incl_test.cpp compile_test_main : : : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/interpolators_cubic_hermite_incl_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/interpolators_makima_incl_test.cpp compile_test_main : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/interpolators_pchip_incl_test.cpp compile_test_main : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/interpolators_quintic_hermite_incl_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/interpolators_septic_hermite_incl_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/interpolators_vector_barycentric_rational_incl_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/interpolators_whittaker_shannon_incl_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_auto_declarations ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/compl_abs_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/compl_acos_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/compl_acosh_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] @@ -1039,6 +1049,12 @@ test-suite misc : [ run compile_test/sf_trunc_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/sf_ulp_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/sf_zeta_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/sf_chebyshev_incl_test.cpp ../config//fftw3 : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/sf_chebyshev_transform_incl_test.cpp ../config//fftw3 : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] [ check-target-builds ../config//has_fftw3 "libfftw3" : : no ] ] + [ run compile_test/sf_fibonacci_incl_test.cpp compile_test_main : : : [ requires cxx17_std_apply cxx17_if_constexpr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ run compile_test/sf_gegenbauer_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ run compile_test/sf_lambert_w_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/sf_nonfinite_num_facets_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/std_real_concept_check.cpp : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ compile compile_test/std_real_concept_check.cpp : EMULATE32 [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : std_real_concept_check_32 ] [ compile compile_test/std_real_concept_check.cpp : EMULATE64 [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : std_real_concept_check_64 ] @@ -1050,6 +1066,11 @@ test-suite misc : [ run compile_test/cstdfloat_concept_check_2.cpp : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/cstdfloat_concept_check_3.cpp : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/cstdfloat_concept_check_4.cpp : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/cstdfloat_cmath_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/cstdfloat_complex_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/cstdfloat_iostream_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/cstdfloat_limits_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/cstdfloat_types_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run test_cstdfloat.cpp ../../test/build//boost_unit_test_framework : : : [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/sf_airy_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/sf_hankel_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] @@ -1057,7 +1078,7 @@ test-suite misc : [ run compile_test/sf_owens_t_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/dist_skew_norm_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run compile_test/constants_incl_test.cpp compile_test_main : : : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] - [ run compile_test/trapezoidal_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_decltype cxx11_unified_initialization_syntax cxx11_variadic_templates ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ run compile_test/quad_trapezoidal_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_decltype cxx11_unified_initialization_syntax cxx11_variadic_templates ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ compile compile_test/test_traits.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ compile compile_test/tools_config_inc_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ compile compile_test/tools_fraction_inc_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] @@ -1074,10 +1095,36 @@ test-suite misc : [ compile compile_test/tools_test_data_inc_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ compile compile_test/tools_test_inc_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ compile compile_test/tools_toms748_inc_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] - [ compile compile_test/cubic_spline_concept_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] - [ compile compile_test/barycentric_rational_concept_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_agm_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_assert_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_atomic_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_big_constant_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_centered_continued_fraction_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_cohen_acceleration_incl_test.cpp : [ requires cxx17_std_apply ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_complex_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_condition_numbers_incl_test.cpp : [ requires cxx17_std_apply cxx17_if_constexpr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_convert_from_string_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_cxx03_warn_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_engel_expansion_incl_test.cpp : [ requires cxx17_std_apply cxx17_if_constexpr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_header_deprecated_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_is_detected_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_lexical_cast_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_luroth_expansion_incl_test.cpp : [ requires cxx17_std_apply cxx17_if_constexpr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_mp_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_norms_incl_test.cpp : [ requires cxx17_std_apply cxx17_if_constexpr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_polynomial_gcd_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_promotion_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_random_vector_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_simple_continued_fraction_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_test_value_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_throw_exception_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_traits_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_ulps_plot_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/tools_workaround_incl_test.cpp : [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/interpolators_cubic_spline_concept_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/interpolators_barycentric_rational_concept_test.cpp : [ requires cxx11_smart_ptr cxx11_defaulted_functions cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ compile compile_test/sf_legendre_stieltjes_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_defaulted_functions cxx11_lambdas ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] - [ compile compile_test/trapezoidal_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_decltype cxx11_unified_initialization_syntax cxx11_variadic_templates ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/quad_trapezoidal_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_decltype cxx11_unified_initialization_syntax cxx11_variadic_templates ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] [ run octonion_test.cpp ../../test/build//boost_unit_test_framework ] [ run quaternion_constexpr_test.cpp ] @@ -1105,8 +1152,8 @@ test-suite interpolators : [ run agm_test.cpp : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] [ run rsqrt_test.cpp : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] [ run cohen_acceleration_test.cpp : : : msvc:/bigobj [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ compile compile_test/daubechies_filters_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] ] - [ compile compile_test/daubechies_scaling_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] ] + [ compile compile_test/filters_daubechies_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] ] + [ compile compile_test/sf_daubechies_scaling_incl_test.cpp : [ requires cxx17_if_constexpr cxx17_std_apply ] ] [ run whittaker_shannon_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] ] [ run cardinal_quadratic_b_spline_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] ] [ run cardinal_quintic_b_spline_test.cpp : : : [ requires cxx11_auto_declarations cxx11_constexpr cxx11_smart_ptr cxx11_defaulted_functions ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] @@ -1118,8 +1165,8 @@ test-suite interpolators : [ run catmull_rom_test.cpp ../../test/build//boost_unit_test_framework : : : TEST=1 [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] : catmull_rom_test_1 ] [ run catmull_rom_test.cpp ../../test/build//boost_unit_test_framework : : : TEST=2 [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] : catmull_rom_test_2 ] [ run catmull_rom_test.cpp ../../test/build//boost_unit_test_framework : : : TEST=3 [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] : catmull_rom_test_3 ] - [ run compile_test/catmull_rom_incl_test.cpp compile_test_main : : : [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] ] - [ run compile_test/catmull_rom_concept_test.cpp compile_test_main : : : [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] ] + [ run compile_test/interpolators_catmull_rom_incl_test.cpp compile_test_main : : : [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] ] + [ run compile_test/interpolators_catmull_rom_concept_test.cpp compile_test_main : : : [ requires cxx11_hdr_array cxx11_hdr_initializer_list ] ] [ run test_standalone_asserts.cpp ] ; @@ -1215,12 +1262,16 @@ test-suite quadrature : : : : release TEST10 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] : exp_sinh_quadrature_test_10 ] - [ run compile_test/exp_sinh_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] - [ run compile_test/sinh_sinh_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] - [ run compile_test/tanh_sinh_incl_test.cpp compile_test_main : : : [ 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" : no ] ] - [ compile compile_test/exp_sinh_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" : no ] ] - [ compile compile_test/sinh_sinh_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" : no ] ] - [ compile compile_test/tanh_sinh_concept_test.cpp : [ 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" : no ] ] + [ run compile_test/quad_exp_sinh_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ run compile_test/quad_sinh_sinh_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ run compile_test/quad_tanh_sinh_incl_test.cpp compile_test_main : : : [ 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" : no ] ] + [ compile compile_test/quad_gauss_incl_test.cpp : [ 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" : no ] ] + [ compile compile_test/quad_gauss_kronrod_incl_test.cpp : [ 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" : no ] ] + [ compile compile_test/quad_ooura_fourier_integrals_incl_test.cpp : [ 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" : no ] ] + [ compile compile_test/quad_wavelet_transforms_incl_test.cpp : [ requires cxx17_std_apply cxx17_if_constexpr ] [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] + [ compile compile_test/quad_exp_sinh_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" : no ] ] + [ compile compile_test/quad_sinh_sinh_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" : no ] ] + [ compile compile_test/quad_tanh_sinh_concept_test.cpp : [ 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" : no ] ] [ run gauss_quadrature_test.cpp : : : TEST1 [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ requires cxx11_auto_declarations cxx11_lambdas cxx11_smart_ptr cxx11_unified_initialization_syntax ] off msvc:/bigobj release : gauss_quadrature_test_1 ] @@ -1337,7 +1388,7 @@ test-suite quadrature : msvc:/bigobj TEST=23 [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_thread cxx11_hdr_atomic cxx11_decltype cxx11_hdr_future cxx11_hdr_chrono cxx11_hdr_random cxx11_allocator ] linux:"-pthread" : naive_monte_carlo_test_23 ] - [ compile compile_test/naive_monte_carlo_incl_test.cpp ../../atomic/build//boost_atomic : + [ compile compile_test/quad_naive_monte_carlo_incl_test.cpp ../../atomic/build//boost_atomic : [ requires cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_thread cxx11_hdr_atomic cxx11_decltype cxx11_hdr_future cxx11_hdr_chrono cxx11_hdr_random cxx11_allocator ] linux:"-pthread" [ check-target-builds ../config//is_ci_sanitizer_run "Sanitizer CI run" : no ] ] @@ -1349,8 +1400,8 @@ test-suite quadrature : test-suite autodiff : [ run test_numerical_differentiation.cpp ../../test/build//boost_unit_test_framework : : : msvc:/bigobj [ requires cxx11_auto_declarations cxx11_constexpr ] ] - [ run compile_test/numerical_differentiation_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_constexpr ] ] - [ compile compile_test/numerical_differentiation_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_constexpr ] ] + [ run compile_test/diff_numerical_differentiation_incl_test.cpp compile_test_main : : : [ requires cxx11_auto_declarations cxx11_constexpr ] ] + [ compile compile_test/diff_numerical_differentiation_concept_test.cpp : [ requires cxx11_auto_declarations cxx11_constexpr ] ] [ run test_autodiff_1.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ requires cxx11_inline_namespaces ] ] [ run test_autodiff_2.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ requires cxx11_inline_namespaces ] ] [ run test_autodiff_3.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ requires cxx11_inline_namespaces ] ] @@ -1359,7 +1410,9 @@ test-suite autodiff : [ run test_autodiff_6.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ requires cxx11_inline_namespaces ] ] [ run test_autodiff_7.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ requires cxx11_inline_namespaces ] ] [ run test_autodiff_8.cpp ../../test/build//boost_unit_test_framework : : : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ requires cxx11_inline_namespaces ] ] - [ compile compile_test/autodiff_incl_test.cpp : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ requires cxx11_inline_namespaces ] ] + [ compile compile_test/diff_autodiff_incl_test.cpp : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ requires cxx11_inline_namespaces ] ] + [ compile compile_test/diff_finite_difference_incl_test.cpp : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ requires cxx11_inline_namespaces ] ] + [ compile compile_test/diff_lanczos_smoothing_incl_test.cpp : gcc-mingw:-Wa,-mbig-obj off msvc:/bigobj release [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] [ requires cxx11_inline_namespaces ] ] ; # diff --git a/test/compile_test/constants_incl_test.cpp b/test/compile_test/constants_incl_test.cpp index 039596c76..c77ced37f 100644 --- a/test/compile_test/constants_incl_test.cpp +++ b/test/compile_test/constants_incl_test.cpp @@ -3,7 +3,7 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -// Basic sanity check that header +// Basic sanity check that header // #includes all the files that it needs to. // #include diff --git a/test/compile_test/cstdfloat_cmath_incl_test.cpp b/test/compile_test/cstdfloat_cmath_incl_test.cpp new file mode 100644 index 000000000..d3d232b4e --- /dev/null +++ b/test/compile_test/cstdfloat_cmath_incl_test.cpp @@ -0,0 +1,92 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + #ifdef BOOST_FLOAT128_C + boost::float128_t f128 = 0; + + check_result(ldexp(f128, 0)); + check_result(frexp(f128, 0)); + check_result(std::fabs(f128)); + check_result(std::abs(f128)); + check_result(floor(f128)); + check_result(ceil(f128)); + check_result(sqrt(f128)); + check_result(trunc(f128)); + check_result(exp(f128)); + check_result(expm1(f128)); + check_result(pow(f128, 0)); + check_result(log(f128)); + check_result(log10(f128)); + check_result(sin(f128)); + check_result(cos(f128)); + check_result(tan(f128)); + check_result(asin(f128)); + check_result(acos(f128)); + check_result(atan(f128)); + check_result(sinh(f128)); + check_result(cosh(f128)); + check_result(tanh(f128)); + check_result(asinh(f128)); + check_result(acosh(f128)); + check_result(atanh(f128)); + check_result(fmod(f128, f128)); + check_result(atan2(f128, f128)); + check_result(lgamma(f128)); + check_result(tgamma(f128)); + check_result(remainder(f128, f128)); + check_result(remquo(f128, f128, 0)); + check_result(fma(f128, f128, f128)); + check_result(fmax(f128, f128)); + check_result(fmin(f128, f128)); + check_result(fdim(f128, f128)); + check_result(nanq(0)); + check_result(exp2(f128)); + check_result(log2(f128)); + check_result(log1p(f128)); + check_result(cbrt(f128)); + check_result(hypot(f128, f128)); + check_result(erf(f128)); + check_result(erfc(f128)); + check_result(llround(f128)); + check_result(lround(f128)); + check_result(round(f128)); + check_result(nearbyint(f128)); + check_result(llrint(f128)); + check_result(lrint(f128)); + check_result(rint(f128)); + check_result(modf(f128, nullptr)); + check_result(scalbln(f128, 0)); + check_result(scalbn(f128, 0)); + check_result(ilogb(f128)); + check_result(logb(f128)); + check_result(nextafter(f128, f128)); + check_result(nexttoward(f128, f128)); + check_result(copysign(f128, f128)); + check_result(std::signbit(f128)); + check_result(std::fpclassify(f128)); + check_result(std::isfinite(f128)); + check_result(std::isinf(f128)); + check_result(std::isnan(f128)); + check_result(std::isnormal(f128)); + check_result(std::isgreater(f128, f128)); + check_result(std::isgreaterequal(f128, f128)); + check_result(std::isless(f128, f128)); + check_result(std::islessequal(f128, f128)); + check_result(std::islessgreater(f128, f128)); + check_result(std::isunordered(f128, f128)); + #endif // boost::float128_t +} diff --git a/test/compile_test/cstdfloat_complex_incl_test.cpp b/test/compile_test/cstdfloat_complex_incl_test.cpp new file mode 100644 index 000000000..4b5f2b4b3 --- /dev/null +++ b/test/compile_test/cstdfloat_complex_incl_test.cpp @@ -0,0 +1,47 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + #ifdef BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE + complex test(0); + + check_result(real(test)); + check_result(imag(test)); + check_result(abs(test)); + check_result(norm(test)); + check_result(conj(test)); + check_result(proj(test)); + check_result(polar(test)); + check_result(sqrt(test)); + check_result(sin(test)); + check_result(cos(test)); + check_result(tan(test)); + check_result(asin(test)); + check_result(acos(test)); + check_result(atan(test)); + check_result(exp(test)); + check_result(log(test)); + check_result(log10(test)); + check_result(pow(test, 0)); + check_result(sinh(test)); + check_result(cosh(test)); + check_result(tanh(test)); + check_result(asinh(test)); + check_result(acosh(test)); + check_result(atanh(test)); + + #endif // BOOST_CSTDFLOAT_EXTENDED_COMPLEX_FLOAT_TYPE +} diff --git a/test/compile_test/cstdfloat_iostream_incl_test.cpp b/test/compile_test/cstdfloat_iostream_incl_test.cpp new file mode 100644 index 000000000..1eb681798 --- /dev/null +++ b/test/compile_test/cstdfloat_iostream_incl_test.cpp @@ -0,0 +1,9 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include diff --git a/test/compile_test/cstdfloat_limits_incl_test.cpp b/test/compile_test/cstdfloat_limits_incl_test.cpp new file mode 100644 index 000000000..4b5bc9b38 --- /dev/null +++ b/test/compile_test/cstdfloat_limits_incl_test.cpp @@ -0,0 +1,51 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + #ifdef BOOST_FLOAT128_C + check_result(std::numeric_limits::is_specialized); + check_result((std::numeric_limits::min)()); + check_result((std::numeric_limits::max)()); + check_result(std::numeric_limits::lowest()); + check_result(std::numeric_limits::digits); + check_result(std::numeric_limits::digits10); + check_result(std::numeric_limits::max_digits10); + check_result(std::numeric_limits::is_signed); + check_result(std::numeric_limits::is_integer); + check_result(std::numeric_limits::is_exact); + check_result(std::numeric_limits::radix); + check_result(std::numeric_limits::epsilon()); + check_result(std::numeric_limits::min_exponent); + check_result(std::numeric_limits::min_exponent10); + check_result(std::numeric_limits::max_exponent); + check_result(std::numeric_limits::max_exponent10); + check_result(std::numeric_limits::has_infinity); + check_result(std::numeric_limits::has_quiet_NaN); + check_result(std::numeric_limits::has_signaling_NaN); + check_result(std::numeric_limits::has_denorm); + check_result(std::numeric_limits::has_denorm_loss); + check_result(std::numeric_limits::infinity()); + check_result(std::numeric_limits::quiet_NaN()); + check_result(std::numeric_limits::signaling_NaN()); + check_result(std::numeric_limits::denorm_min()); + check_result(std::numeric_limits::is_iec559); + check_result(std::numeric_limits::is_bounded); + check_result(std::numeric_limits::is_modulo); + check_result(std::numeric_limits::traps); + check_result(std::numeric_limits::tinyness_before); + check_result(std::numeric_limits::round_style); + #endif +} diff --git a/test/compile_test/cstdfloat_types_incl_test.cpp b/test/compile_test/cstdfloat_types_incl_test.cpp new file mode 100644 index 000000000..7a882757e --- /dev/null +++ b/test/compile_test/cstdfloat_types_incl_test.cpp @@ -0,0 +1,9 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include diff --git a/test/compile_test/autodiff_incl_test.cpp b/test/compile_test/diff_autodiff_incl_test.cpp similarity index 100% rename from test/compile_test/autodiff_incl_test.cpp rename to test/compile_test/diff_autodiff_incl_test.cpp diff --git a/test/compile_test/diff_finite_difference_incl_test.cpp b/test/compile_test/diff_finite_difference_incl_test.cpp new file mode 100644 index 000000000..acaaf7647 --- /dev/null +++ b/test/compile_test/diff_finite_difference_incl_test.cpp @@ -0,0 +1,29 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result(boost::math::differentiation::finite_difference_derivative([](float x){return x;}, f)); + check_result(boost::math::differentiation::finite_difference_derivative([](double x){return x;}, d)); + #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::differentiation::finite_difference_derivative([](long double x){return x;}, static_cast(0))); + #endif + + check_result(boost::math::differentiation::complex_step_derivative([](std::complex x){return x;}, f)); + check_result(boost::math::differentiation::complex_step_derivative([](std::complex x){return x;}, d)); + #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::differentiation::complex_step_derivative([](std::complex x){return x;}, + static_cast(0))); + #endif +} diff --git a/test/compile_test/diff_lanczos_smoothing_incl_test.cpp b/test/compile_test/diff_lanczos_smoothing_incl_test.cpp new file mode 100644 index 000000000..38ba479b4 --- /dev/null +++ b/test/compile_test/diff_lanczos_smoothing_incl_test.cpp @@ -0,0 +1,30 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + float f_temp; + boost::math::differentiation::discrete_lanczos_derivative f_lanczos(f_temp); + check_result(f_lanczos.get_spacing()); + + double d_temp; + boost::math::differentiation::discrete_lanczos_derivative d_lanczos(d_temp); + check_result(d_lanczos.get_spacing()); + + #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + long double ld_temp; + boost::math::differentiation::discrete_lanczos_derivative ld_lanczos(ld_temp); + check_result(ld_lanczos.get_spacing()); + #endif +} diff --git a/test/compile_test/numerical_differentiation_concept_test.cpp b/test/compile_test/diff_numerical_differentiation_concept_test.cpp similarity index 100% rename from test/compile_test/numerical_differentiation_concept_test.cpp rename to test/compile_test/diff_numerical_differentiation_concept_test.cpp diff --git a/test/compile_test/numerical_differentiation_incl_test.cpp b/test/compile_test/diff_numerical_differentiation_incl_test.cpp similarity index 100% rename from test/compile_test/numerical_differentiation_incl_test.cpp rename to test/compile_test/diff_numerical_differentiation_incl_test.cpp diff --git a/test/compile_test/dist_arcsine_incl_test.cpp b/test/compile_test/dist_arcsine_incl_test.cpp new file mode 100644 index 000000000..9fee57886 --- /dev/null +++ b/test/compile_test/dist_arcsine_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(arcsine) +} + +template class boost::math::arcsine_distribution >; +template class boost::math::arcsine_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::arcsine_distribution >; +#endif diff --git a/test/compile_test/dist_empirical_cumulative_dist_func_incl_test.cpp b/test/compile_test/dist_empirical_cumulative_dist_func_incl_test.cpp new file mode 100644 index 000000000..d2a360bf4 --- /dev/null +++ b/test/compile_test/dist_empirical_cumulative_dist_func_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + boost::math::empirical_cumulative_distribution_function f_test(float[]); + boost::math::empirical_cumulative_distribution_function d_test(double[]); + #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + boost::math::empirical_cumulative_distribution_function d_test(long double[]); + #endif +} diff --git a/test/compile_test/dist_geometric_incl_test.cpp b/test/compile_test/dist_geometric_incl_test.cpp new file mode 100644 index 000000000..660b861fd --- /dev/null +++ b/test/compile_test/dist_geometric_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(geometric) +} + +template class boost::math::geometric_distribution >; +template class boost::math::geometric_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::geometric_distribution >; +#endif diff --git a/test/compile_test/dist_inv_gaussian_incl_test.cpp b/test/compile_test/dist_inv_gaussian_incl_test.cpp new file mode 100644 index 000000000..c4193e296 --- /dev/null +++ b/test/compile_test/dist_inv_gaussian_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + TEST_DIST_FUNC(inverse_gaussian) +} + +template class boost::math::inverse_gaussian_distribution >; +template class boost::math::inverse_gaussian_distribution >; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS +template class boost::math::inverse_gaussian_distribution >; +#endif diff --git a/test/compile_test/daubechies_filters_incl_test.cpp b/test/compile_test/filters_daubechies_incl_test.cpp similarity index 100% rename from test/compile_test/daubechies_filters_incl_test.cpp rename to test/compile_test/filters_daubechies_incl_test.cpp diff --git a/test/compile_test/barycentric_rational_concept_test.cpp b/test/compile_test/interpolators_barycentric_rational_concept_test.cpp similarity index 83% rename from test/compile_test/barycentric_rational_concept_test.cpp rename to test/compile_test/interpolators_barycentric_rational_concept_test.cpp index 9ae6f00f8..81850e232 100644 --- a/test/compile_test/barycentric_rational_concept_test.cpp +++ b/test/compile_test/interpolators_barycentric_rational_concept_test.cpp @@ -13,7 +13,7 @@ void compile_and_link_test() { boost::math::concepts::std_real_concept x[] = { 1, 2, 3 }; boost::math::concepts::std_real_concept y[] = { 13, 15, 17 }; - boost::math::barycentric_rational s(x, y, 3, 3); + boost::math::interpolators::barycentric_rational s(x, y, 3, 3); s(1.0); } diff --git a/test/compile_test/barycentric_rational_incl_test.cpp b/test/compile_test/interpolators_barycentric_rational_incl_test.cpp similarity index 90% rename from test/compile_test/barycentric_rational_incl_test.cpp rename to test/compile_test/interpolators_barycentric_rational_incl_test.cpp index fc1e71d75..3b3995c6e 100644 --- a/test/compile_test/barycentric_rational_incl_test.cpp +++ b/test/compile_test/interpolators_barycentric_rational_incl_test.cpp @@ -22,6 +22,6 @@ void compile_and_link_test() { double data[] = { 1, 2, 3 }; double y[] = { 34, 56, 67 }; - boost::math::barycentric_rational s(data, y, 3, 2); + boost::math::interpolators::barycentric_rational s(data, y, 3, 2); check_result(s(1.0)); } diff --git a/test/compile_test/interpolators_cardinal_trig_incl_test.cpp b/test/compile_test/interpolators_cardinal_trig_incl_test.cpp new file mode 100644 index 000000000..18b4539c3 --- /dev/null +++ b/test/compile_test/interpolators_cardinal_trig_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// A sanity check that this file +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" +// +// This test includes becasue many of the interpolators are not compatible with pointers/c-style arrays +// +#include + +void compile_and_link_test() +{ + std::vector data = { 1, 2, 3 }; + boost::math::interpolators::cardinal_trigonometric> s(data, 3, 2); + check_result(s(1.0)); +} diff --git a/test/compile_test/catmull_rom_concept_test.cpp b/test/compile_test/interpolators_catmull_rom_concept_test.cpp similarity index 100% rename from test/compile_test/catmull_rom_concept_test.cpp rename to test/compile_test/interpolators_catmull_rom_concept_test.cpp diff --git a/test/compile_test/catmull_rom_incl_test.cpp b/test/compile_test/interpolators_catmull_rom_incl_test.cpp similarity index 100% rename from test/compile_test/catmull_rom_incl_test.cpp rename to test/compile_test/interpolators_catmull_rom_incl_test.cpp diff --git a/test/compile_test/interpolators_cubic_hermite_incl_test.cpp b/test/compile_test/interpolators_cubic_hermite_incl_test.cpp new file mode 100644 index 000000000..50c27ce43 --- /dev/null +++ b/test/compile_test/interpolators_cubic_hermite_incl_test.cpp @@ -0,0 +1,26 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// A sanity check that this file +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" +// +// This test includes becasue many of the interpolators are not compatible with pointers/c-style arrays +// +#include + +void compile_and_link_test() +{ + std::vector data = { 1, 2, 3 }; + std::vector data_dx = {1, 2, 3}; + boost::math::interpolators::cardinal_cubic_hermite> s(std::move(data), std::move(data_dx), 3, 2); + check_result(s(1.0)); +} diff --git a/test/compile_test/cubic_spline_concept_test.cpp b/test/compile_test/interpolators_cubic_spline_concept_test.cpp similarity index 100% rename from test/compile_test/cubic_spline_concept_test.cpp rename to test/compile_test/interpolators_cubic_spline_concept_test.cpp diff --git a/test/compile_test/cubic_spline_incl_test.cpp b/test/compile_test/interpolators_cubic_spline_incl_test.cpp similarity index 100% rename from test/compile_test/cubic_spline_incl_test.cpp rename to test/compile_test/interpolators_cubic_spline_incl_test.cpp diff --git a/test/compile_test/interpolators_makima_incl_test.cpp b/test/compile_test/interpolators_makima_incl_test.cpp new file mode 100644 index 000000000..f4da34dc2 --- /dev/null +++ b/test/compile_test/interpolators_makima_incl_test.cpp @@ -0,0 +1,26 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// A sanity check that this file +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" +// +// This test includes becasue many of the interpolators are not compatible with pointers/c-style arrays +// +#include + +void compile_and_link_test() +{ + std::vector data_x = { 1, 2, 3 }; + std::vector data_y = {1, 2, 3}; + boost::math::interpolators::makima> s(std::move(data_x), std::move(data_y), 3, 2); + check_result(s(1.0)); +} diff --git a/test/compile_test/interpolators_pchip_incl_test.cpp b/test/compile_test/interpolators_pchip_incl_test.cpp new file mode 100644 index 000000000..4257e9994 --- /dev/null +++ b/test/compile_test/interpolators_pchip_incl_test.cpp @@ -0,0 +1,26 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// A sanity check that this file +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" +// +// This test includes becasue many of the interpolators are not compatible with pointers/c-style arrays +// +#include + +void compile_and_link_test() +{ + std::vector data_x = { 1, 2, 3 }; + std::vector data_y = {1, 2, 3}; + boost::math::interpolators::pchip> s(std::move(data_x), std::move(data_y), 3, 2); + check_result(s(1.0)); +} diff --git a/test/compile_test/interpolators_quintic_hermite_incl_test.cpp b/test/compile_test/interpolators_quintic_hermite_incl_test.cpp new file mode 100644 index 000000000..df688287c --- /dev/null +++ b/test/compile_test/interpolators_quintic_hermite_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// A sanity check that this file +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" +// +// This test includes becasue many of the interpolators are not compatible with pointers/c-style arrays +// +#include + +void compile_and_link_test() +{ + std::vector data = { 1, 2, 3 }; + std::vector data_1st_deriv = {1, 2, 3}; + std::vector data_2nd_deriv = {1, 2, 3}; + boost::math::interpolators::cardinal_quintic_hermite> s(std::move(data), std::move(data_1st_deriv), + std::move(data_2nd_deriv), 1.0, 1.0); + check_result(s(1.0)); +} diff --git a/test/compile_test/interpolators_septic_hermite_incl_test.cpp b/test/compile_test/interpolators_septic_hermite_incl_test.cpp new file mode 100644 index 000000000..0ab830830 --- /dev/null +++ b/test/compile_test/interpolators_septic_hermite_incl_test.cpp @@ -0,0 +1,29 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// A sanity check that this file +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" +// +// This test includes becasue many of the interpolators are not compatible with pointers/c-style arrays +// +#include + +void compile_and_link_test() +{ + std::vector data = { 1, 2, 3 }; + std::vector data_1st_deriv = {1, 2, 3}; + std::vector data_2nd_deriv = {1, 2, 3}; + std::vector data_3rd_deriv = {1, 2, 3}; + boost::math::interpolators::cardinal_septic_hermite> s(std::move(data), std::move(data_1st_deriv), + std::move(data_2nd_deriv), std::move(data_3rd_deriv), 1.0, 1.0); + check_result(s(1.0)); +} diff --git a/test/compile_test/interpolators_vector_barycentric_rational_incl_test.cpp b/test/compile_test/interpolators_vector_barycentric_rational_incl_test.cpp new file mode 100644 index 000000000..3d2cf3b66 --- /dev/null +++ b/test/compile_test/interpolators_vector_barycentric_rational_incl_test.cpp @@ -0,0 +1,27 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// A sanity check that this file +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" +// +// This test includes becasue many of the interpolators are not compatible with pointers/c-style arrays +// +#include + +void compile_and_link_test() +{ + std::vector time = { 1, 2, 3 }; + std::vector> space = {{1}, {2}, {3}}; + boost::math::interpolators::vector_barycentric_rational s(std::move(time), std::move(space)); + + check_result>(s(1.0)); +} diff --git a/test/compile_test/interpolators_whittaker_shannon_incl_test.cpp b/test/compile_test/interpolators_whittaker_shannon_incl_test.cpp new file mode 100644 index 000000000..f2540f36a --- /dev/null +++ b/test/compile_test/interpolators_whittaker_shannon_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// A sanity check that this file +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" +// +// This test includes becasue many of the interpolators are not compatible with pointers/c-style arrays +// +#include + +void compile_and_link_test() +{ + std::vector data_y = {1, 2, 3}; + boost::math::interpolators::whittaker_shannon> s(std::move(data_y), 3, 2); + check_result(s(1.0)); +} diff --git a/test/compile_test/exp_sinh_concept_test.cpp b/test/compile_test/quad_exp_sinh_concept_test.cpp similarity index 100% rename from test/compile_test/exp_sinh_concept_test.cpp rename to test/compile_test/quad_exp_sinh_concept_test.cpp diff --git a/test/compile_test/exp_sinh_incl_test.cpp b/test/compile_test/quad_exp_sinh_incl_test.cpp similarity index 89% rename from test/compile_test/exp_sinh_incl_test.cpp rename to test/compile_test/quad_exp_sinh_incl_test.cpp index 62f68876c..651311055 100644 --- a/test/compile_test/exp_sinh_incl_test.cpp +++ b/test/compile_test/quad_exp_sinh_incl_test.cpp @@ -3,7 +3,7 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -// Basic sanity check that header +// Basic sanity check that header // #includes all the files that it needs to. // #include diff --git a/test/compile_test/quad_gauss_incl_test.cpp b/test/compile_test/quad_gauss_incl_test.cpp new file mode 100644 index 000000000..93e12a9c6 --- /dev/null +++ b/test/compile_test/quad_gauss_incl_test.cpp @@ -0,0 +1,21 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + auto f = [](double x) { return x; }; + boost::math::quadrature::gauss integrator; + check_result(integrator.integrate(f)); +} diff --git a/test/compile_test/quad_gauss_kronrod_incl_test.cpp b/test/compile_test/quad_gauss_kronrod_incl_test.cpp new file mode 100644 index 000000000..801ddc33d --- /dev/null +++ b/test/compile_test/quad_gauss_kronrod_incl_test.cpp @@ -0,0 +1,21 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + auto f = [](double x) { return x; }; + boost::math::quadrature::gauss integrator; + check_result(integrator.integrate(f)); +} diff --git a/test/compile_test/naive_monte_carlo_concept_test.cpp b/test/compile_test/quad_naive_monte_carlo_concept_test.cpp similarity index 100% rename from test/compile_test/naive_monte_carlo_concept_test.cpp rename to test/compile_test/quad_naive_monte_carlo_concept_test.cpp diff --git a/test/compile_test/naive_monte_carlo_incl_test.cpp b/test/compile_test/quad_naive_monte_carlo_incl_test.cpp similarity index 100% rename from test/compile_test/naive_monte_carlo_incl_test.cpp rename to test/compile_test/quad_naive_monte_carlo_incl_test.cpp diff --git a/test/compile_test/quad_ooura_fourier_integrals_incl_test.cpp b/test/compile_test/quad_ooura_fourier_integrals_incl_test.cpp new file mode 100644 index 000000000..ee683dd69 --- /dev/null +++ b/test/compile_test/quad_ooura_fourier_integrals_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +#ifndef _MSC_VER +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + auto f = [](double x) { return x; }; + boost::math::quadrature::ooura_fourier_sin sin_integrator; + boost::math::quadrature::ooura_fourier_cos cos_integrator; + check_result(sin_integrator.integrate(f, 1.0)); + check_result(cos_integrator.integrate(f, 1.0)); +} +#endif diff --git a/test/compile_test/sinh_sinh_concept_test.cpp b/test/compile_test/quad_sinh_sinh_concept_test.cpp similarity index 100% rename from test/compile_test/sinh_sinh_concept_test.cpp rename to test/compile_test/quad_sinh_sinh_concept_test.cpp diff --git a/test/compile_test/sinh_sinh_incl_test.cpp b/test/compile_test/quad_sinh_sinh_incl_test.cpp similarity index 83% rename from test/compile_test/sinh_sinh_incl_test.cpp rename to test/compile_test/quad_sinh_sinh_incl_test.cpp index ed6f05e1e..8b58c14fb 100644 --- a/test/compile_test/sinh_sinh_incl_test.cpp +++ b/test/compile_test/quad_sinh_sinh_incl_test.cpp @@ -3,7 +3,7 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -// Basic sanity check that header +// Basic sanity check that header // #includes all the files that it needs to. // #include @@ -15,7 +15,7 @@ void compile_and_link_test() { - auto f = [](double x) { return 1/(1+x*x); }; + auto f = [](double x) { return x; }; boost::math::quadrature::sinh_sinh integrator; check_result(integrator.integrate(f)); } diff --git a/test/compile_test/tanh_sinh_concept_test.cpp b/test/compile_test/quad_tanh_sinh_concept_test.cpp similarity index 100% rename from test/compile_test/tanh_sinh_concept_test.cpp rename to test/compile_test/quad_tanh_sinh_concept_test.cpp diff --git a/test/compile_test/tanh_sinh_incl_test.cpp b/test/compile_test/quad_tanh_sinh_incl_test.cpp similarity index 78% rename from test/compile_test/tanh_sinh_incl_test.cpp rename to test/compile_test/quad_tanh_sinh_incl_test.cpp index ef5fff794..bf794c75b 100644 --- a/test/compile_test/tanh_sinh_incl_test.cpp +++ b/test/compile_test/quad_tanh_sinh_incl_test.cpp @@ -3,7 +3,7 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -// Basic sanity check that header +// Basic sanity check that header // #includes all the files that it needs to. // #include @@ -16,8 +16,6 @@ void compile_and_link_test() { auto f = [](double x) { return x; }; - double a = 0; - double b = 1; boost::math::quadrature::tanh_sinh integrator; - check_result(integrator.integrate(f, a, b)); + check_result(integrator.integrate(f)); } diff --git a/test/compile_test/trapezoidal_concept_test.cpp b/test/compile_test/quad_trapezoidal_concept_test.cpp similarity index 100% rename from test/compile_test/trapezoidal_concept_test.cpp rename to test/compile_test/quad_trapezoidal_concept_test.cpp diff --git a/test/compile_test/trapezoidal_incl_test.cpp b/test/compile_test/quad_trapezoidal_incl_test.cpp similarity index 89% rename from test/compile_test/trapezoidal_incl_test.cpp rename to test/compile_test/quad_trapezoidal_incl_test.cpp index 984982321..c37080a3c 100644 --- a/test/compile_test/trapezoidal_incl_test.cpp +++ b/test/compile_test/quad_trapezoidal_incl_test.cpp @@ -3,7 +3,7 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // -// Basic sanity check that header +// Basic sanity check that header // #includes all the files that it needs to. // #include diff --git a/test/compile_test/quad_wavelet_transforms_incl_test.cpp b/test/compile_test/quad_wavelet_transforms_incl_test.cpp new file mode 100644 index 000000000..71f9457b9 --- /dev/null +++ b/test/compile_test/quad_wavelet_transforms_incl_test.cpp @@ -0,0 +1,22 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + auto f = [](double x) { return x; }; + auto psi = boost::math::daubechies_wavelet(); + auto Wf = boost::math::quadrature::daubechies_wavelet_transform(f, psi); + check_result(Wf(0.0, 0.0)); +} diff --git a/test/compile_test/sf_chebyshev_incl_test.cpp b/test/compile_test/sf_chebyshev_incl_test.cpp new file mode 100644 index 000000000..357cd8c36 --- /dev/null +++ b/test/compile_test/sf_chebyshev_incl_test.cpp @@ -0,0 +1,22 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + double x {2.0}; + check_result(boost::math::chebyshev_t(0, x)); + check_result(boost::math::chebyshev_u(0, x)); + check_result(boost::math::chebyshev_t_prime(0, x)); +} diff --git a/test/compile_test/sf_chebyshev_transform_incl_test.cpp b/test/compile_test/sf_chebyshev_transform_incl_test.cpp new file mode 100644 index 000000000..72abc21fe --- /dev/null +++ b/test/compile_test/sf_chebyshev_transform_incl_test.cpp @@ -0,0 +1,21 @@ +// Copyright Matt Borland 2021 +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + auto f = [](double x) { return x; }; + boost::math::chebyshev_transform test(f, 0.0, 1.0); + check_result(test(1.0)); +} diff --git a/test/compile_test/daubechies_scaling_incl_test.cpp b/test/compile_test/sf_daubechies_scaling_incl_test.cpp similarity index 100% rename from test/compile_test/daubechies_scaling_incl_test.cpp rename to test/compile_test/sf_daubechies_scaling_incl_test.cpp diff --git a/test/compile_test/sf_fibonacci_incl_test.cpp b/test/compile_test/sf_fibonacci_incl_test.cpp new file mode 100644 index 000000000..9f747519e --- /dev/null +++ b/test/compile_test/sf_fibonacci_incl_test.cpp @@ -0,0 +1,29 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result(boost::math::fibonacci(f)); + check_result(boost::math::fibonacci(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::fibonacci(l)); +#endif + + check_result(boost::math::unchecked_fibonacci(f)); + check_result(boost::math::unchecked_fibonacci(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::unchecked_fibonacci(l)); +#endif +} diff --git a/test/compile_test/sf_gegenbauer_incl_test.cpp b/test/compile_test/sf_gegenbauer_incl_test.cpp new file mode 100644 index 000000000..f670e838f --- /dev/null +++ b/test/compile_test/sf_gegenbauer_incl_test.cpp @@ -0,0 +1,35 @@ +// Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result(boost::math::gegenbauer(1, f, f)); + check_result(boost::math::gegenbauer(1, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::gegenbauer(1, l, l)); +#endif + + check_result(boost::math::gegenbauer_derivative(1, f, f, 1)); + check_result(boost::math::gegenbauer_derivative(1, d, d, 1)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::gegenbauer_derivative(1, l, l, 1)); +#endif + + check_result(boost::math::gegenbauer_prime(1, f, f)); + check_result(boost::math::gegenbauer_prime(1, d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::gegenbauer_prime(1, l, l)); +#endif +} diff --git a/test/compile_test/sf_lambert_w_incl_test.cpp b/test/compile_test/sf_lambert_w_incl_test.cpp new file mode 100644 index 000000000..7b2fec32a --- /dev/null +++ b/test/compile_test/sf_lambert_w_incl_test.cpp @@ -0,0 +1,41 @@ +// Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result(boost::math::lambert_w0(f)); + check_result(boost::math::lambert_w0(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::lambert_w0(l)); +#endif + + check_result(boost::math::lambert_w0_prime(f)); + check_result(boost::math::lambert_w0_prime(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::lambert_w0_prime(l)); +#endif + + check_result(boost::math::lambert_wm1(f)); + check_result(boost::math::lambert_wm1(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::lambert_wm1(l)); +#endif + + check_result(boost::math::lambert_wm1_prime(f)); + check_result(boost::math::lambert_wm1_prime(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::lambert_wm1_prime(l)); +#endif +} diff --git a/test/compile_test/sf_nonfinite_num_facets_incl_test.cpp b/test/compile_test/sf_nonfinite_num_facets_incl_test.cpp new file mode 100644 index 000000000..1fa19f09b --- /dev/null +++ b/test/compile_test/sf_nonfinite_num_facets_incl_test.cpp @@ -0,0 +1,9 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include diff --git a/test/compile_test/sf_rsqrt_incl_test.cpp b/test/compile_test/sf_rsqrt_incl_test.cpp new file mode 100644 index 000000000..c1aceb95b --- /dev/null +++ b/test/compile_test/sf_rsqrt_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result(boost::math::rsqrt(f)); + check_result(boost::math::rsqrt(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::rsqrt(l)); +#endif +} diff --git a/test/compile_test/sf_trigamma_incl_test.cpp b/test/compile_test/sf_trigamma_incl_test.cpp new file mode 100644 index 000000000..cd2fcddff --- /dev/null +++ b/test/compile_test/sf_trigamma_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result(boost::math::trigamma(f)); + check_result(boost::math::trigamma(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::trigamma(l)); +#endif +} diff --git a/test/compile_test/tools_agm_incl_test.cpp b/test/compile_test/tools_agm_incl_test.cpp new file mode 100644 index 000000000..c34213d57 --- /dev/null +++ b/test/compile_test/tools_agm_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result(boost::math::tools::agm(f, f)); + check_result(boost::math::tools::agm(d, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::tools::agm(l, l)); +#endif +} diff --git a/test/compile_test/tools_assert_incl_test.cpp b/test/compile_test/tools_assert_incl_test.cpp new file mode 100644 index 000000000..18005bbc5 --- /dev/null +++ b/test/compile_test/tools_assert_incl_test.cpp @@ -0,0 +1,9 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include diff --git a/test/compile_test/tools_atomic_incl_test.cpp b/test/compile_test/tools_atomic_incl_test.cpp new file mode 100644 index 000000000..5b987e72a --- /dev/null +++ b/test/compile_test/tools_atomic_incl_test.cpp @@ -0,0 +1,9 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include diff --git a/test/compile_test/tools_big_constant_incl_test.cpp b/test/compile_test/tools_big_constant_incl_test.cpp new file mode 100644 index 000000000..598f65296 --- /dev/null +++ b/test/compile_test/tools_big_constant_incl_test.cpp @@ -0,0 +1,11 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#ifndef BOOST_MATH_STANDALONE +#include +#endif diff --git a/test/compile_test/tools_centered_continued_fraction_incl_test.cpp b/test/compile_test/tools_centered_continued_fraction_incl_test.cpp new file mode 100644 index 000000000..ff185aee1 --- /dev/null +++ b/test/compile_test/tools_centered_continued_fraction_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright Matt Borland 2021 +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + boost::math::tools::centered_continued_fraction f_test(f); + check_result(f_test.khinchin_geometric_mean()); + + boost::math::tools::centered_continued_fraction test(0.0); + check_result(test.khinchin_geometric_mean()); + +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + boost::math::tools::centered_continued_fraction ld_test(static_cast(0)); + check_result(ld_test.khinchin_geometric_mean()); +#endif +} diff --git a/test/compile_test/tools_cohen_acceleration_incl_test.cpp b/test/compile_test/tools_cohen_acceleration_incl_test.cpp new file mode 100644 index 000000000..5517540b7 --- /dev/null +++ b/test/compile_test/tools_cohen_acceleration_incl_test.cpp @@ -0,0 +1,43 @@ +// Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +template +class G { +public: + G(){ + k_ = 0; + } + + Real operator()() { + k_ += 1; + return 1/(k_*k_); + } + +private: + Real k_; +}; + +void compile_and_link_test() +{ + auto f_g = G(); + check_result(boost::math::tools::cohen_acceleration(f_g)); + + auto d_g = G(); + check_result(boost::math::tools::cohen_acceleration(d_g)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + auto ld_g = G(); + check_result(boost::math::tools::cohen_acceleration(ld_g)); +#endif +} diff --git a/test/compile_test/tools_complex_incl_test.cpp b/test/compile_test/tools_complex_incl_test.cpp new file mode 100644 index 000000000..cf14f58ab --- /dev/null +++ b/test/compile_test/tools_complex_incl_test.cpp @@ -0,0 +1,9 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include diff --git a/test/compile_test/tools_condition_numbers_incl_test.cpp b/test/compile_test/tools_condition_numbers_incl_test.cpp new file mode 100644 index 000000000..c5f57d3bc --- /dev/null +++ b/test/compile_test/tools_condition_numbers_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + boost::math::tools::summation_condition_number f_test(f); + check_result(f_test()); + + boost::math::tools::summation_condition_number test(0.0); + check_result(test()); + +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + boost::math::tools::summation_condition_number ld_test(static_cast(0)); + check_result(ld_test()); +#endif +} diff --git a/test/compile_test/tools_convert_from_string_incl_test.cpp b/test/compile_test/tools_convert_from_string_incl_test.cpp new file mode 100644 index 000000000..1548ae377 --- /dev/null +++ b/test/compile_test/tools_convert_from_string_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#ifndef BOOST_MATH_STANDALONE +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + const char* val_c_str = "0.0"; + + check_result(boost::math::tools::convert_from_string(val_c_str)); + check_result(boost::math::tools::convert_from_string(val_c_str)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::tools::convert_from_string(val_c_str)); +#endif +} + +#endif diff --git a/test/compile_test/tools_cxx03_warn_incl_test.cpp b/test/compile_test/tools_cxx03_warn_incl_test.cpp new file mode 100644 index 000000000..9112e79db --- /dev/null +++ b/test/compile_test/tools_cxx03_warn_incl_test.cpp @@ -0,0 +1,9 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include diff --git a/test/compile_test/tools_engel_expansion_incl_test.cpp b/test/compile_test/tools_engel_expansion_incl_test.cpp new file mode 100644 index 000000000..0a391eba0 --- /dev/null +++ b/test/compile_test/tools_engel_expansion_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + boost::math::tools::engel_expansion f_test(1.0f); + check_result(f_test.digits().front()); + + boost::math::tools::engel_expansion d_test(1.0); + check_result(d_test.digits().front()); + +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + boost::math::tools::engel_expansion ld_test(1.0l); + check_result(ld_test.digits().front()); +#endif +} diff --git a/test/compile_test/tools_header_deprecated_incl_test.cpp b/test/compile_test/tools_header_deprecated_incl_test.cpp new file mode 100644 index 000000000..9dfc8daef --- /dev/null +++ b/test/compile_test/tools_header_deprecated_incl_test.cpp @@ -0,0 +1,9 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include diff --git a/test/compile_test/tools_is_detected_incl_test.cpp b/test/compile_test/tools_is_detected_incl_test.cpp new file mode 100644 index 000000000..3b4102a29 --- /dev/null +++ b/test/compile_test/tools_is_detected_incl_test.cpp @@ -0,0 +1,9 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include diff --git a/test/compile_test/tools_lexical_cast_incl_test.cpp b/test/compile_test/tools_lexical_cast_incl_test.cpp new file mode 100644 index 000000000..ad832a1fb --- /dev/null +++ b/test/compile_test/tools_lexical_cast_incl_test.cpp @@ -0,0 +1,9 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include diff --git a/test/compile_test/tools_luroth_expansion_incl_test.cpp b/test/compile_test/tools_luroth_expansion_incl_test.cpp new file mode 100644 index 000000000..ddaacba15 --- /dev/null +++ b/test/compile_test/tools_luroth_expansion_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + boost::math::tools::luroth_expansion f_test(0.0f); + check_result(f_test.digits().front()); + + boost::math::tools::luroth_expansion d_test(0.0); + check_result(d_test.digits().front()); + +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + boost::math::tools::luroth_expansion ld_test(0.0l); + check_result(ld_test.digits().front()); +#endif +} diff --git a/test/compile_test/tools_mp_incl_test.cpp b/test/compile_test/tools_mp_incl_test.cpp new file mode 100644 index 000000000..b54a4aa0a --- /dev/null +++ b/test/compile_test/tools_mp_incl_test.cpp @@ -0,0 +1,13 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// + +// Currently disabled because Apple Clang, MSVC, and Mingw all throw errors internal to their STL implementation (mborland 4/2021) +#if 0 +#include +#endif diff --git a/test/compile_test/tools_norms_incl_test.cpp b/test/compile_test/tools_norms_incl_test.cpp new file mode 100644 index 000000000..2e79e9d25 --- /dev/null +++ b/test/compile_test/tools_norms_incl_test.cpp @@ -0,0 +1,9 @@ +// Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include diff --git a/test/compile_test/tools_polynomial_gcd_incl_test.cpp b/test/compile_test/tools_polynomial_gcd_incl_test.cpp new file mode 100644 index 000000000..d5fc0bb27 --- /dev/null +++ b/test/compile_test/tools_polynomial_gcd_incl_test.cpp @@ -0,0 +1,25 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + boost::math::tools::polynomial p_int; + check_result(boost::math::tools::content(p_int)); + check_result(boost::math::tools::leading_coefficient(p_int)); + + boost::math::tools::polynomial p_long; + check_result(boost::math::tools::content(p_long)); + check_result(boost::math::tools::leading_coefficient(p_long)); +} diff --git a/test/compile_test/tools_promotion_incl_test.cpp b/test/compile_test/tools_promotion_incl_test.cpp new file mode 100644 index 000000000..ae5c98a77 --- /dev/null +++ b/test/compile_test/tools_promotion_incl_test.cpp @@ -0,0 +1,9 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include diff --git a/test/compile_test/tools_random_vector_incl_test.cpp b/test/compile_test/tools_random_vector_incl_test.cpp new file mode 100644 index 000000000..0741ed0a1 --- /dev/null +++ b/test/compile_test/tools_random_vector_incl_test.cpp @@ -0,0 +1,31 @@ +// Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + auto f_test = boost::math::generate_random_vector(0, 128); + check_result(f_test.front()); + + auto d_test = boost::math::generate_random_vector(0, 128); + check_result(d_test.front()); + +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + auto ld_test = boost::math::generate_random_vector(0, 128); + check_result(ld_test.front()); +#endif + + auto int_test = boost::math::generate_random_vector(0, 128); + check_result(int_test.front()); +} diff --git a/test/compile_test/tools_simple_continued_fraction_incl_test.cpp b/test/compile_test/tools_simple_continued_fraction_incl_test.cpp new file mode 100644 index 000000000..cbb11cbd7 --- /dev/null +++ b/test/compile_test/tools_simple_continued_fraction_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + boost::math::tools::simple_continued_fraction f_test(f); + check_result(f_test.khinchin_geometric_mean()); + + boost::math::tools::simple_continued_fraction test(0.0); + check_result(test.khinchin_geometric_mean()); + +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + boost::math::tools::simple_continued_fraction ld_test(l); + check_result(ld_test.khinchin_geometric_mean()); +#endif +} diff --git a/test/compile_test/tools_test_value_incl_test.cpp b/test/compile_test/tools_test_value_incl_test.cpp new file mode 100644 index 000000000..0b7cb6287 --- /dev/null +++ b/test/compile_test/tools_test_value_incl_test.cpp @@ -0,0 +1,9 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include diff --git a/test/compile_test/tools_throw_exception_incl_test.cpp b/test/compile_test/tools_throw_exception_incl_test.cpp new file mode 100644 index 000000000..56b4acdd4 --- /dev/null +++ b/test/compile_test/tools_throw_exception_incl_test.cpp @@ -0,0 +1,9 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include diff --git a/test/compile_test/tools_traits_incl_test.cpp b/test/compile_test/tools_traits_incl_test.cpp new file mode 100644 index 000000000..1e29251f3 --- /dev/null +++ b/test/compile_test/tools_traits_incl_test.cpp @@ -0,0 +1,9 @@ +// Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include diff --git a/test/compile_test/tools_ulps_plot_incl_test.cpp b/test/compile_test/tools_ulps_plot_incl_test.cpp new file mode 100644 index 000000000..e30406f0e --- /dev/null +++ b/test/compile_test/tools_ulps_plot_incl_test.cpp @@ -0,0 +1,21 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + auto f = [](double x) { return x; }; + boost::math::tools::ulps_plot test(f, 1.0f, 2.0f); + auto dummy = test.width(1); +} diff --git a/test/compile_test/tools_workaround_incl_test.cpp b/test/compile_test/tools_workaround_incl_test.cpp new file mode 100644 index 000000000..87f5ce528 --- /dev/null +++ b/test/compile_test/tools_workaround_incl_test.cpp @@ -0,0 +1,23 @@ +// Copyright Matt Borland 2021. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result(boost::math::tools::fmod_workaround(f,f)); + check_result(boost::math::tools::fmod_workaround(d,d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::tools::fmod_workaround(l,l)); +#endif +} diff --git a/test/test_barycentric_rational.cpp b/test/test_barycentric_rational.cpp index 21d3b99dd..226877004 100644 --- a/test/test_barycentric_rational.cpp +++ b/test/test_barycentric_rational.cpp @@ -40,7 +40,7 @@ void test_interpolation_condition() y[i] = dis(gen); } - boost::math::barycentric_rational interpolator(x.data(), y.data(), y.size()); + boost::math::interpolators::barycentric_rational interpolator(x.data(), y.data(), y.size()); for (size_t i = 0; i < x.size(); ++i) { @@ -51,7 +51,7 @@ void test_interpolation_condition() // Make sure that the move constructor does the same thing: std::vector x_copy = x; std::vector y_copy = y; - boost::math::barycentric_rational move_interpolator(std::move(x), std::move(y)); + boost::math::interpolators::barycentric_rational move_interpolator(std::move(x), std::move(y)); for (size_t i = 0; i < x_copy.size(); ++i) { @@ -77,7 +77,7 @@ void test_interpolation_condition_high_order() } // Order 5 approximation: - boost::math::barycentric_rational interpolator(x.data(), y.data(), y.size(), 5); + boost::math::interpolators::barycentric_rational interpolator(x.data(), y.data(), y.size(), 5); for (size_t i = 0; i < x.size(); ++i) { @@ -105,7 +105,7 @@ void test_constant() y[i] = y[0]; } - boost::math::barycentric_rational interpolator(x.data(), y.data(), y.size()); + boost::math::interpolators::barycentric_rational interpolator(x.data(), y.data(), y.size()); for (size_t i = 0; i < x.size(); ++i) { @@ -136,7 +136,7 @@ void test_constant_high_order() } // Set interpolation order to 7: - boost::math::barycentric_rational interpolator(x.data(), y.data(), y.size(), 7); + boost::math::interpolators::barycentric_rational interpolator(x.data(), y.data(), y.size(), 7); for (size_t i = 0; i < x.size(); ++i) { @@ -165,7 +165,7 @@ void test_runge() y[i] = 1/(1+25*x[i]*x[i]); } - boost::math::barycentric_rational interpolator(x.data(), y.data(), y.size(), 5); + boost::math::interpolators::barycentric_rational interpolator(x.data(), y.data(), y.size(), 5); for (size_t i = 0; i < x.size(); ++i) { @@ -218,7 +218,7 @@ void test_weights() y[i] = 1/(1+25*x[i]*x[i]); } - boost::math::detail::barycentric_rational_imp interpolator(x.data(), x.data() + x.size(), y.data(), 0); + boost::math::interpolators::detail::barycentric_rational_imp interpolator(x.data(), x.data() + x.size(), y.data(), 0); for (size_t i = 0; i < x.size(); ++i) { @@ -234,7 +234,7 @@ void test_weights() } // d = 1: - interpolator = boost::math::detail::barycentric_rational_imp(x.data(), x.data() + x.size(), y.data(), 1); + interpolator = boost::math::interpolators::detail::barycentric_rational_imp(x.data(), x.data() + x.size(), y.data(), 1); for (size_t i = 1; i < x.size() -1; ++i) { diff --git a/test/test_vector_barycentric_rational.cpp b/test/test_vector_barycentric_rational.cpp index ccfaa3b6a..f8050d242 100644 --- a/test/test_vector_barycentric_rational.cpp +++ b/test/test_vector_barycentric_rational.cpp @@ -54,9 +54,9 @@ void test_agreement_with_1d() } boost::random::uniform_real_distribution dis2(t[0], t[t.size()-1]); - boost::math::vector_barycentric_rational interpolator(std::move(t), std::move(y)); - boost::math::barycentric_rational scalar_interpolator0(std::move(t_copy0), std::move(y_copy0)); - boost::math::barycentric_rational scalar_interpolator1(std::move(t_copy1), std::move(y_copy1)); + boost::math::interpolators::vector_barycentric_rational interpolator(std::move(t), std::move(y)); + boost::math::interpolators::barycentric_rational scalar_interpolator0(std::move(t_copy0), std::move(y_copy0)); + boost::math::interpolators::barycentric_rational scalar_interpolator1(std::move(t_copy1), std::move(y_copy1)); Eigen::Vector2d z; @@ -93,7 +93,7 @@ void test_interpolation_condition_eigen() std::vector y_copy = y; std::vector t_copy = t; - boost::math::vector_barycentric_rational interpolator(std::move(t), std::move(y)); + boost::math::interpolators::vector_barycentric_rational interpolator(std::move(t), std::move(y)); Eigen::Vector2d z; for (size_t i = 0; i < t_copy.size(); ++i) @@ -125,7 +125,7 @@ void test_interpolation_condition_std_array() std::vector> y_copy = y; std::vector t_copy = t; - boost::math::vector_barycentric_rational interpolator(std::move(t), std::move(y)); + boost::math::interpolators::vector_barycentric_rational interpolator(std::move(t), std::move(y)); std::array z; for (size_t i = 0; i < t_copy.size(); ++i) @@ -161,7 +161,7 @@ void test_interpolation_condition_ublas() std::vector t_copy = t; std::vector> y_copy = y; - boost::math::vector_barycentric_rational interpolator(std::move(t), std::move(y)); + boost::math::interpolators::vector_barycentric_rational interpolator(std::move(t), std::move(y)); boost::numeric::ublas::vector z(2); for (size_t i = 0; i < t_copy.size(); ++i) @@ -192,7 +192,7 @@ void test_interpolation_condition_high_order() std::vector y_copy = y; std::vector t_copy = t; - boost::math::vector_barycentric_rational interpolator(std::move(t), std::move(y), 5); + boost::math::interpolators::vector_barycentric_rational interpolator(std::move(t), std::move(y), 5); Eigen::Vector2d z; for (size_t i = 0; i < t_copy.size(); ++i) @@ -228,7 +228,7 @@ void test_constant_eigen() std::vector y_copy = y; std::vector t_copy = t; - boost::math::vector_barycentric_rational interpolator(std::move(t), std::move(y)); + boost::math::interpolators::vector_barycentric_rational interpolator(std::move(t), std::move(y)); Eigen::Vector2d z; for (size_t i = 0; i < t_copy.size(); ++i) @@ -271,7 +271,7 @@ void test_constant_std_array() std::vector> y_copy = y; std::vector t_copy = t; - boost::math::vector_barycentric_rational interpolator(std::move(t), std::move(y)); + boost::math::interpolators::vector_barycentric_rational interpolator(std::move(t), std::move(y)); std::array z; for (size_t i = 0; i < t_copy.size(); ++i) @@ -313,7 +313,7 @@ void test_constant_high_order() std::vector y_copy = y; std::vector t_copy = t; - boost::math::vector_barycentric_rational interpolator(std::move(t), std::move(y), 5); + boost::math::interpolators::vector_barycentric_rational interpolator(std::move(t), std::move(y), 5); Eigen::Vector2d z; for (size_t i = 0; i < t_copy.size(); ++i) @@ -353,7 +353,7 @@ void test_weights() std::vector y_copy = y; std::vector t_copy = t; - boost::math::detail::vector_barycentric_rational_imp interpolator(std::move(t), std::move(y), 1); + boost::math::interpolators::detail::vector_barycentric_rational_imp interpolator(std::move(t), std::move(y), 1); for (size_t i = 1; i < t_copy.size() - 1; ++i) {