From e682c1be3326a7b4ead43ff1c50149a4ce226e2e Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 1 Aug 2023 14:25:04 -0400 Subject: [PATCH 01/10] Update sanitizer images (#1011) --- .drone.star | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.star b/.drone.star index 7b773dda7d..6b9ee76629 100644 --- a/.drone.star +++ b/.drone.star @@ -32,10 +32,10 @@ def main(ctx): # # Sanitizers: # - result.append(linux_cxx("Ubuntu g++-10 C++2a ASAN" + " " + suite, "g++-10", packages="g++-10", privileged=True, buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': 'gnu++2a', 'TEST_SUITE': suite, 'OPTIONS': '-fsanitize=address -fsanitize=address -DBOOST_CI_SANITIZER_BUILD' }, globalenv=globalenv)) - result.append(linux_cxx("Ubuntu g++-10 C++2a USAN" + " " + suite, "g++-10", packages="g++-10", privileged=True, buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': 'gnu++2a', 'TEST_SUITE': suite, 'OPTIONS': '-fsanitize=undefined -fsanitize=undefined -DBOOST_CI_SANITIZER_BUILD' }, globalenv=globalenv)) - result.append(linux_cxx("Ubuntu g++-10 C++2a TSAN" + " " + suite, "g++-10", packages="g++-10", privileged=True, buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': 'gnu++2a', 'TEST_SUITE': suite, 'OPTIONS': '-fsanitize=thread -fsanitize=thread -DBOOST_CI_SANITIZER_BUILD' }, globalenv=globalenv)) - result.append(linux_cxx("Ubuntu clang++-10 C++2a ISAN" + " " + suite, "clang++-10", packages="clang-10", privileged=True, buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': 'gnu++2a', 'TEST_SUITE': suite, 'OPTIONS': '-fsanitize=integer -fsanitize=integer' }, globalenv=globalenv)) + result.append(linux_cxx("Ubuntu g++-12 C++20 ASAN" + " " + suite, "g++-12", packages="g++-12", privileged=True, buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-12', 'CXXSTD': 'gnu++20', 'TEST_SUITE': suite, 'OPTIONS': '-fsanitize=address -fsanitize=address -DBOOST_CI_SANITIZER_BUILD' }, globalenv=globalenv)) + result.append(linux_cxx("Ubuntu g++-12 C++20 USAN" + " " + suite, "g++-12", packages="g++-12", privileged=True, buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-12', 'CXXSTD': 'gnu++20', 'TEST_SUITE': suite, 'OPTIONS': '-fsanitize=undefined -fsanitize=undefined -DBOOST_CI_SANITIZER_BUILD' }, globalenv=globalenv)) + result.append(linux_cxx("Ubuntu g++-12 C++20 TSAN" + " " + suite, "g++-12", packages="g++-12", privileged=True, buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-12', 'CXXSTD': 'gnu++20', 'TEST_SUITE': suite, 'OPTIONS': '-fsanitize=thread -fsanitize=thread -DBOOST_CI_SANITIZER_BUILD' }, globalenv=globalenv)) + result.append(linux_cxx("Ubuntu clang++-14 C++20 ISAN" + " " + suite, "clang++-14", packages="clang-14", privileged=True, buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-14', 'CXXSTD': 'gnu++20', 'TEST_SUITE': suite, 'OPTIONS': '-fsanitize=integer -fsanitize=integer' }, globalenv=globalenv)) for suite in things_to_test: for cxx in gnu_5_stds: From 4508717de62cd0624e8310545b19aceca110f218 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 18 Aug 2023 16:20:15 -0400 Subject: [PATCH 02/10] fix unused abterm1 compile warnings --- .../math/quadrature/detail/exp_sinh_detail.hpp | 2 -- include/boost/math/tools/config.hpp | 17 ----------------- 2 files changed, 19 deletions(-) diff --git a/include/boost/math/quadrature/detail/exp_sinh_detail.hpp b/include/boost/math/quadrature/detail/exp_sinh_detail.hpp index a11a6aeb0c..db4863e7ac 100644 --- a/include/boost/math/quadrature/detail/exp_sinh_detail.hpp +++ b/include/boost/math/quadrature/detail/exp_sinh_detail.hpp @@ -226,7 +226,6 @@ auto exp_sinh_detail::integrate(const F& f, Real* error, Real* L1, auto weight_row = get_weight_row(i); first_j = first_j == 0 ? 0 : 2 * first_j - 1; // appoximate location to start looking for lowest meaningful abscissa value - BOOST_MATH_MAYBE_UNUSED Real abterm1 = 1; std::size_t j = first_j; while (abscissas_row[j] < min_abscissa) ++j; @@ -237,7 +236,6 @@ auto exp_sinh_detail::integrate(const F& f, Real* error, Real* L1, sum += y*weight_row[j]; Real abterm0 = abs(y)*weight_row[j]; absum += abterm0; - abterm1 = abterm0; } I1 += sum*h; diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index 66e7da52ab..8316c0bc78 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -146,23 +146,6 @@ # define BOOST_MATH_EXEC_COMPATIBLE #endif -// Attributes from C++14 and newer -#ifdef __has_cpp_attribute - -// C++17 -#if (__cplusplus >= 201703L || _MSVC_LANG >= 201703L) -# if __has_cpp_attribute(maybe_unused) -# define BOOST_MATH_MAYBE_UNUSED [[maybe_unused]] -# endif -#endif - -#endif // Standalone config - -// If attributes are not defined make sure we don't have compiler errors -#ifndef BOOST_MATH_MAYBE_UNUSED -# define BOOST_MATH_MAYBE_UNUSED -#endif - // C++23 #if __cplusplus > 202002L || _MSVC_LANG > 202002L # if __GNUC__ >= 13 From 56b71a77c018aac32a23a54d4d164a98f9be1b62 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Tue, 22 Aug 2023 11:09:43 +0200 Subject: [PATCH 03/10] MSVC 14_0 stdndards and has-include corrections --- .github/workflows/ci.yml | 14 ++++++++++---- include/boost/math/tools/promotion.hpp | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f446b5c48a..c2bde322c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -180,12 +180,14 @@ jobs: run: shell: cmd env: - ARGS: toolset=${{ matrix.toolset }} address-model=64 cxxstd=${{ matrix.standard }} + ARGS0: toolset=${{ matrix.toolset }} address-model=64 cxxstd=${{ matrix.standard0 }} + ARGS2: toolset=${{ matrix.toolset }} address-model=64 cxxstd=${{ matrix.standard2 }} strategy: fail-fast: false matrix: toolset: [ msvc-14.0, msvc-14.2 ] - standard: [ 14, 17 ] + standard0: [ 14, latest ] + standard2: [ 14, 17 ] suite: [ github_ci_block_1, github_ci_block_2 ] steps: - uses: actions/checkout@v3 @@ -214,8 +216,12 @@ jobs: - name: Config info run: config_info_travis working-directory: ../boost-root/libs/config/test - - name: Test - run: ..\..\..\b2 --hash %ARGS% define=CI_SUPPRESS_KNOWN_ISSUES debug-symbols=off ${{ matrix.suite }} pch=off + - name: Test0 + if: ${{ matrix.toolset == 'msvc-14.0' }} + run: ..\..\..\b2 --hash %ARGS0% define=CI_SUPPRESS_KNOWN_ISSUES debug-symbols=off ${{ matrix.suite }} pch=off + - name: Test2 + if: ${{ matrix.toolset == 'msvc-14.2' }} + run: ..\..\..\b2 --hash %ARGS2% define=CI_SUPPRESS_KNOWN_ISSUES debug-symbols=off ${{ matrix.suite }} pch=off working-directory: ../boost-root/libs/math/test windows_gcc: runs-on: windows-2019 diff --git a/include/boost/math/tools/promotion.hpp b/include/boost/math/tools/promotion.hpp index 68127efb04..edb953fb22 100644 --- a/include/boost/math/tools/promotion.hpp +++ b/include/boost/math/tools/promotion.hpp @@ -26,8 +26,8 @@ #include #include -#if __has_include() -# include +#if (defined(__has_include) && __has_include()) +#include #endif namespace boost From 4069a75a83c76bde8e9455b328d360bcc8d04fea Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Tue, 22 Aug 2023 11:17:05 +0200 Subject: [PATCH 04/10] Supply proper working directory in CI --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2bde322c1..79c343ae93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -219,6 +219,7 @@ jobs: - name: Test0 if: ${{ matrix.toolset == 'msvc-14.0' }} run: ..\..\..\b2 --hash %ARGS0% define=CI_SUPPRESS_KNOWN_ISSUES debug-symbols=off ${{ matrix.suite }} pch=off + working-directory: ../boost-root/libs/math/test - name: Test2 if: ${{ matrix.toolset == 'msvc-14.2' }} run: ..\..\..\b2 --hash %ARGS2% define=CI_SUPPRESS_KNOWN_ISSUES debug-symbols=off ${{ matrix.suite }} pch=off From 320d6f8ab71f4aa62a5dc6b50f41c38061eb98e1 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Tue, 22 Aug 2023 11:28:28 +0200 Subject: [PATCH 05/10] Use elementary yet more-obscure PP checks --- include/boost/math/tools/promotion.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/math/tools/promotion.hpp b/include/boost/math/tools/promotion.hpp index edb953fb22..c46cfa1f18 100644 --- a/include/boost/math/tools/promotion.hpp +++ b/include/boost/math/tools/promotion.hpp @@ -26,9 +26,11 @@ #include #include -#if (defined(__has_include) && __has_include()) +#if !(defined(_MSC_VER) && (_MSC_VER <= 1900)) +#if __has_include() #include #endif +#endif namespace boost { From a14f39ff50574656de39c0b1f87c0ea96e183194 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Tue, 22 Aug 2023 12:41:41 +0200 Subject: [PATCH 06/10] Correct the CI runner logic in YAML --- .github/workflows/ci.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79c343ae93..f0f891a442 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -180,14 +180,13 @@ jobs: run: shell: cmd env: - ARGS0: toolset=${{ matrix.toolset }} address-model=64 cxxstd=${{ matrix.standard0 }} - ARGS2: toolset=${{ matrix.toolset }} address-model=64 cxxstd=${{ matrix.standard2 }} + ARGS: toolset=${{ matrix.toolset }} address-model=64 cxxstd=${{ matrix.standard }} + ARGSLATEST: toolset=${{ matrix.toolset }} address-model=64 cxxstd=latest strategy: fail-fast: false matrix: toolset: [ msvc-14.0, msvc-14.2 ] - standard0: [ 14, latest ] - standard2: [ 14, 17 ] + standard: [ 14, 17 ] suite: [ github_ci_block_1, github_ci_block_2 ] steps: - uses: actions/checkout@v3 @@ -216,13 +215,13 @@ jobs: - name: Config info run: config_info_travis working-directory: ../boost-root/libs/config/test - - name: Test0 - if: ${{ matrix.toolset == 'msvc-14.0' }} - run: ..\..\..\b2 --hash %ARGS0% define=CI_SUPPRESS_KNOWN_ISSUES debug-symbols=off ${{ matrix.suite }} pch=off + - name: Test std-14 vc140 and std-14-17 vc142 + if: ${{ matrix.toolset != 'msvc-14.0' || matrix.standard != '17' }} + run: ..\..\..\b2 --hash %ARGS% define=CI_SUPPRESS_KNOWN_ISSUES debug-symbols=off ${{ matrix.suite }} pch=off working-directory: ../boost-root/libs/math/test - - name: Test2 - if: ${{ matrix.toolset == 'msvc-14.2' }} - run: ..\..\..\b2 --hash %ARGS2% define=CI_SUPPRESS_KNOWN_ISSUES debug-symbols=off ${{ matrix.suite }} pch=off + - name: Test std-latest vc140 + if: ${{ matrix.toolset == 'msvc-14.0' && matrix.standard == '17' }} + run: ..\..\..\b2 --hash %ARGSLATEST% define=CI_SUPPRESS_KNOWN_ISSUES debug-symbols=off ${{ matrix.suite }} pch=off working-directory: ../boost-root/libs/math/test windows_gcc: runs-on: windows-2019 From 4c964bb2ecc5b639426b05a07e9d78abf0b58cc4 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Tue, 22 Aug 2023 15:07:22 +0200 Subject: [PATCH 07/10] Agree on PP syntax for query --- include/boost/math/tools/promotion.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/math/tools/promotion.hpp b/include/boost/math/tools/promotion.hpp index c46cfa1f18..7b7789d037 100644 --- a/include/boost/math/tools/promotion.hpp +++ b/include/boost/math/tools/promotion.hpp @@ -26,10 +26,10 @@ #include #include -#if !(defined(_MSC_VER) && (_MSC_VER <= 1900)) -#if __has_include() -#include -#endif +#if defined __has_include +# if __has_include () +# include +# endif #endif namespace boost From 7b37e2378bde0768544aaa76a89c303f54f38e96 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Tue, 22 Aug 2023 19:35:53 +0200 Subject: [PATCH 08/10] Eliminate unused parameter --- include/boost/math/tools/big_constant.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/math/tools/big_constant.hpp b/include/boost/math/tools/big_constant.hpp index bec93a1165..b26d8cf86d 100644 --- a/include/boost/math/tools/big_constant.hpp +++ b/include/boost/math/tools/big_constant.hpp @@ -60,7 +60,7 @@ inline T make_big_value(largest_float, const char* s, std::false_type const&, st } #else template -inline T make_big_value(largest_float, const char* s, std::false_type const&, std::false_type const&) +inline T make_big_value(largest_float, const char*, std::false_type const&, std::false_type const&) { static_assert(sizeof(T) == 0, "Type is unsupported in standalone mode. Please disable and try again."); } From 3d8e1d5362295f28f714b45723fff6f6a118c1ff Mon Sep 17 00:00:00 2001 From: ryanelandt Date: Wed, 23 Aug 2023 09:17:45 -0400 Subject: [PATCH 09/10] test fix for multiprecision 562 (#1015) --- test/Jamfile.v2 | 2 +- test/test_autodiff_7.cpp | 41 ---------------------------------------- test/test_classify.cpp | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 42 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 7885649f71..691fbebc07 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -983,7 +983,7 @@ test-suite misc : [ run centered_continued_fraction_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] [ run luroth_expansion_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] [ run engel_expansion_test.cpp : : : [ requires cxx17_if_constexpr cxx17_std_apply ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] - [ run test_classify.cpp pch ../../test/build//boost_unit_test_framework ] + [ run test_classify.cpp pch ../../test/build//boost_unit_test_framework : : : msvc:/bigobj ] [ run test_error_handling.cpp ../../test/build//boost_unit_test_framework ] [ run legendre_stieltjes_test.cpp ../../test/build//boost_unit_test_framework : : : [ requires cxx11_auto_declarations cxx11_range_based_for ] [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : -lquadmath ] ] [ run test_minima.cpp pch ../../test/build//boost_unit_test_framework ] diff --git a/test/test_autodiff_7.cpp b/test/test_autodiff_7.cpp index c41d806ae4..cbf81c6566 100644 --- a/test/test_autodiff_7.cpp +++ b/test/test_autodiff_7.cpp @@ -23,45 +23,4 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(expm1_hpp, T, all_float_types) { } } -BOOST_AUTO_TEST_CASE_TEMPLATE(fpclassify_hpp, T, all_float_types) { - using boost::math::fpclassify; - using boost::math::isfinite; - using boost::math::isinf; - using boost::math::isnan; - using boost::math::isnormal; - using boost::multiprecision::fpclassify; - using boost::multiprecision::isfinite; - using boost::multiprecision::isinf; - using boost::multiprecision::isnan; - using boost::multiprecision::isnormal; - - using test_constants = test_constants_t; - static constexpr auto m = test_constants::order; - test_detail::RandomSample x_sampler{-1000, 1000}; - for (auto i : boost::irange(test_constants::n_samples)) { - std::ignore = i; - - BOOST_CHECK_EQUAL(fpclassify(make_fvar(0)), FP_ZERO); - BOOST_CHECK_EQUAL(fpclassify(make_fvar(10)), FP_NORMAL); - BOOST_CHECK_EQUAL( - fpclassify(make_fvar(std::numeric_limits::infinity())), - FP_INFINITE); - BOOST_CHECK_EQUAL( - fpclassify(make_fvar(std::numeric_limits::quiet_NaN())), - FP_NAN); - if (std::numeric_limits::has_denorm != std::denorm_absent) { - BOOST_CHECK_EQUAL( - fpclassify(make_fvar(std::numeric_limits::denorm_min())), - FP_SUBNORMAL); - } - - BOOST_CHECK(isfinite(make_fvar(0))); - BOOST_CHECK(isnormal(make_fvar((std::numeric_limits::min)()))); - BOOST_CHECK( - !isnormal(make_fvar(std::numeric_limits::denorm_min()))); - BOOST_CHECK(isinf(make_fvar(std::numeric_limits::infinity()))); - BOOST_CHECK(isnan(make_fvar(std::numeric_limits::quiet_NaN()))); - } -} - BOOST_AUTO_TEST_SUITE_END() diff --git a/test/test_classify.cpp b/test/test_classify.cpp index d7a7c4d249..e6f51a0c77 100644 --- a/test/test_classify.cpp +++ b/test/test_classify.cpp @@ -16,6 +16,8 @@ #include #include +#include "test_autodiff.hpp" + #ifdef _MSC_VER #pragma warning(disable: 4127 4146) // conditional expression is constant #endif @@ -256,6 +258,9 @@ void test_classify(T t, const char* type) #endif } + +BOOST_AUTO_TEST_SUITE(test_fpclassify) + BOOST_AUTO_TEST_CASE( test_main ) { BOOST_MATH_CONTROL_FP; @@ -288,6 +293,16 @@ BOOST_AUTO_TEST_CASE( test_main ) test_classify(unsigned(0), "unsigned"); } +BOOST_AUTO_TEST_CASE_TEMPLATE(fpclassify_autodiff, T, all_float_types) { + test_classify(boost::math::differentiation::make_fvar(0), "autodiff float"); + test_classify(boost::math::differentiation::make_fvar(0), "autodiff float"); + test_classify(boost::math::differentiation::make_fvar(0), "autodiff float"); + test_classify(boost::math::differentiation::make_fvar(0), "autodiff float"); + test_classify(boost::math::differentiation::make_fvar(0), "autodiff float"); +} + +BOOST_AUTO_TEST_SUITE_END() + /* Autorun "i:\Boost-sandbox\math_toolkit\libs\math\test\MSVC80\debug\test_classify.exe" Running 1 test case... From 74bb4bccf231e063f25bd9d1cea5493ec261409e Mon Sep 17 00:00:00 2001 From: Jimmy Lu Date: Thu, 24 Aug 2023 08:31:37 -0400 Subject: [PATCH 10/10] Fix inverse_discrete_quantile for large guess (#1007) If `guess` passed to `inverse_discrete_quantile` cannot be represented as floating point number, it is possible that `guess + 1` or `guess - 1` does not change the value at all and we are stuck in infinite loop inside `round_to_floor` or `round_to_ceil`. Fix this by increase/decrease more than 1 in these cases. Example code to reproduce this: ```c++ boost::math::binomial_distribution<> dist(9079765771874083840, 0.561815); boost::math::quantile(dist, 0.0365346); ``` --- .../detail/inv_discrete_quantile.hpp | 16 ++++++---------- test/test_binomial.cpp | 12 ++++++++++++ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/include/boost/math/distributions/detail/inv_discrete_quantile.hpp b/include/boost/math/distributions/detail/inv_discrete_quantile.hpp index 25216e88f6..7ded3d39ad 100644 --- a/include/boost/math/distributions/detail/inv_discrete_quantile.hpp +++ b/include/boost/math/distributions/detail/inv_discrete_quantile.hpp @@ -302,15 +302,13 @@ inline typename Dist::value_type round_to_floor(const Dist& d, typename Dist::va // while(result != 0) { - cc = result - 1; + cc = floor(float_prior(result)); if(cc < support(d).first) break; pp = c ? cdf(complement(d, cc)) : cdf(d, cc); - if(pp == p) - result = cc; - else if(c ? pp > p : pp < p) + if(c ? pp > p : pp < p) break; - result -= 1; + result = cc; } return result; @@ -336,15 +334,13 @@ inline typename Dist::value_type round_to_ceil(const Dist& d, typename Dist::val // while(true) { - cc = result + 1; + cc = ceil(float_next(result)); if(cc > support(d).second) break; pp = c ? cdf(complement(d, cc)) : cdf(d, cc); - if(pp == p) - result = cc; - else if(c ? pp < p : pp > p) + if(c ? pp < p : pp > p) break; - result += 1; + result = cc; } return result; diff --git a/test/test_binomial.cpp b/test/test_binomial.cpp index fa50da7f5a..34baeaa6be 100644 --- a/test/test_binomial.cpp +++ b/test/test_binomial.cpp @@ -716,6 +716,18 @@ void test_spots(RealType T) check_out_of_range >(1, 1); // (All) valid constructor parameter values. + // TODO: Generic ibeta_power_terms has accuracy issue when long + // double is not precise enough, causing overflow in this case. + if(!std::is_same::value || + sizeof(boost::math::concepts::real_concept_base_type) > 8) + { + using namespace boost::math::policies; + typedef policy > Policy; + binomial_distribution dist(9079765771874083840, 0.561815); + // Accuracy is not too important here; the main purpose is to + // make sure it is not stuck. + BOOST_CHECK_CLOSE(quantile(dist, 0.0365346), 5101148604445670400, 1e12); + } } // template void test_spots(RealType)