From 246172b58c50d37a767823eb4bc9c7dd0c4e7966 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 2 Jun 2016 11:45:33 +0100 Subject: [PATCH 1/3] Fix mpfr error rate --- test/math/test_carlson_3.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/math/test_carlson_3.cpp b/test/math/test_carlson_3.cpp index a4b723a6..adf2002a 100644 --- a/test/math/test_carlson_3.cpp +++ b/test/math/test_carlson_3.cpp @@ -24,6 +24,13 @@ void expected_results() ".*", // test type(s) ".*RJ.*", // test data group ".*", 2700, 250); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*", // test type(s) + ".*RD: y = z", // test data group + ".*", 120, 30); // test function add_expected_result( ".*", // compiler ".*", // stdlib From 10e2be2c1ec37e9722b74c1cfdcf536cdecf4a0a Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 3 Jun 2016 15:10:12 +0100 Subject: [PATCH 2/3] Fix expected error rates for mpf_float variable-precision, also squash one warning --- test/math/setup.hpp | 1 + test/math/test_carlson_1.cpp | 21 +++++++++++++++++++++ test/math/test_carlson_2.cpp | 14 ++++++++++++++ test/math/test_carlson_4.cpp | 7 +++++++ test/math/test_ellint_1.cpp | 2 +- test/math/test_ellint_3.cpp | 7 +++++++ test/math/test_gamma.cpp | 2 +- test/math/test_ibeta_inv_1.cpp | 7 +++++++ 8 files changed, 59 insertions(+), 2 deletions(-) diff --git a/test/math/setup.hpp b/test/math/setup.hpp index 752acf7c..e07b49ef 100644 --- a/test/math/setup.hpp +++ b/test/math/setup.hpp @@ -10,6 +10,7 @@ #endif #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#undef BOOST_MATH_SMALL_CONSTANT #define BOOST_MATH_SMALL_CONSTANT(x) x #if !defined(TEST_MPF_50) && !defined(TEST_BACKEND) && !defined(TEST_CPP_DEC_FLOAT) \ diff --git a/test/math/test_carlson_1.cpp b/test/math/test_carlson_1.cpp index 4309a5b9..9bb971db 100644 --- a/test/math/test_carlson_1.cpp +++ b/test/math/test_carlson_1.cpp @@ -18,6 +18,13 @@ void expected_results() // Define the max and mean errors expected for // various compilers and platforms. // + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*gmp_float<0>.*", // test type(s) + ".*RJ.*", // test data group + ".*", 40000, 4000); // test function add_expected_result( ".*", // compiler ".*", // stdlib @@ -25,6 +32,20 @@ void expected_results() ".*", // test type(s) ".*RJ.*", // test data group ".*", 2700, 250); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*gmp_float<0>.*", // test type(s) + ".*RC.*", // test data group + ".*", 7000, 1000); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*gmp_float<0>.*", // test type(s) + ".*RF.*", // test data group + ".*", 12000, 700); // test function add_expected_result( ".*", // compiler ".*", // stdlib diff --git a/test/math/test_carlson_2.cpp b/test/math/test_carlson_2.cpp index 933108d9..2b32febb 100644 --- a/test/math/test_carlson_2.cpp +++ b/test/math/test_carlson_2.cpp @@ -17,6 +17,20 @@ void expected_results() // Define the max and mean errors expected for // various compilers and platforms. // + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*gmp_float<0>.*", // test type(s) + ".*RJ.*", // test data group + ".*", 40000, 4000); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*gmp_float<0>.*", // test type(s) + ".*RC.*", // test data group + ".*", 7000, 1000); // test function add_expected_result( ".*", // compiler ".*", // stdlib diff --git a/test/math/test_carlson_4.cpp b/test/math/test_carlson_4.cpp index abea8163..9cc42346 100644 --- a/test/math/test_carlson_4.cpp +++ b/test/math/test_carlson_4.cpp @@ -17,6 +17,13 @@ void expected_results() // Define the max and mean errors expected for // various compilers and platforms. // + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*", // test type(s) + "RG: two values the same", // test data group + ".*", 10000, 700); // test function add_expected_result( ".*", // compiler ".*", // stdlib diff --git a/test/math/test_ellint_1.cpp b/test/math/test_ellint_1.cpp index fc158ff3..39c2a1c1 100644 --- a/test/math/test_ellint_1.cpp +++ b/test/math/test_ellint_1.cpp @@ -29,7 +29,7 @@ void expected_results() ".*", // platform ".*", // test type(s) ".*", // test data group - ".*", 40, 20); // test function + ".*", 70, 20); // test function // // Finish off by printing out the compiler/stdlib/platform names, // we do this to make it easier to mark up expected error rates. diff --git a/test/math/test_ellint_3.cpp b/test/math/test_ellint_3.cpp index f6facd25..db276d34 100644 --- a/test/math/test_ellint_3.cpp +++ b/test/math/test_ellint_3.cpp @@ -37,6 +37,13 @@ void expected_results() ".*mpfr_float_backend<0>.*", // test type(s) ".*Mathworld.*", // test data group ".*", 10000, 3000); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*gmp_float<0>.*", // test type(s) + ".*", // test data group + ".*", 10000, 1200); // test function add_expected_result( ".*", // compiler ".*", // stdlib diff --git a/test/math/test_gamma.cpp b/test/math/test_gamma.cpp index 1d7bb1f7..65663f1b 100644 --- a/test/math/test_gamma.cpp +++ b/test/math/test_gamma.cpp @@ -36,7 +36,7 @@ void expected_results() ".*", // platform ".*", // test type(s) "factorials", // test data group - "tgamma", 140, 70); // test function + "tgamma", 170, 70); // test function add_expected_result( ".*", // compiler ".*", // stdlib diff --git a/test/math/test_ibeta_inv_1.cpp b/test/math/test_ibeta_inv_1.cpp index fa7e0056..e13c05a6 100644 --- a/test/math/test_ibeta_inv_1.cpp +++ b/test/math/test_ibeta_inv_1.cpp @@ -25,6 +25,13 @@ void expected_results() ".*mpfr_float_backend<0>.*", // test type(s) ".*", // test data group ".*", 20000000, 1000000); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*gmp_float<0>.*", // test type(s) + ".*", // test data group + ".*", 20000000, 1000000); // test function add_expected_result( ".*", // compiler ".*", // stdlib From 818073a0f85da5e136c60a29e9620d9f99f783c8 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sat, 4 Jun 2016 15:50:02 +0100 Subject: [PATCH 3/3] Fixes for clang warnings --- include/boost/multiprecision/detail/number_base.hpp | 4 ---- include/boost/multiprecision/miller_rabin.hpp | 2 +- test/test_arithmetic.hpp | 12 ++++++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/boost/multiprecision/detail/number_base.hpp b/include/boost/multiprecision/detail/number_base.hpp index 83b1dda7..85b493f0 100644 --- a/include/boost/multiprecision/detail/number_base.hpp +++ b/include/boost/multiprecision/detail/number_base.hpp @@ -488,7 +488,6 @@ struct expression result_type r(*this); return static_cast(r); } - explicit operator void()const {} # endif #else operator unmentionable_type()const @@ -556,7 +555,6 @@ struct expression result_type r(*this); return static_cast(r); } - explicit operator void()const {} # endif #else operator unmentionable_type()const @@ -635,7 +633,6 @@ struct expression result_type r(*this); return static_cast(r); } - explicit operator void()const {} # endif #else operator unmentionable_type()const @@ -723,7 +720,6 @@ struct expression result_type r(*this); return static_cast(r); } - explicit operator void()const {} # endif #else operator unmentionable_type()const diff --git a/include/boost/multiprecision/miller_rabin.hpp b/include/boost/multiprecision/miller_rabin.hpp index 96dac04d..156f9b85 100644 --- a/include/boost/multiprecision/miller_rabin.hpp +++ b/include/boost/multiprecision/miller_rabin.hpp @@ -6,7 +6,7 @@ #ifndef BOOST_MP_MR_HPP #define BOOST_MP_MR_HPP -#include +#include #include namespace boost{ diff --git a/test/test_arithmetic.hpp b/test/test_arithmetic.hpp index f7179b67..55b90e3c 100644 --- a/test/test_arithmetic.hpp +++ b/test/test_arithmetic.hpp @@ -414,8 +414,10 @@ void test_integer_ops(const boost::mpl::int_> (1uLL << (sizeof(long long) * CHAR_BIT - 2))), std::out_of_range);