diff --git a/.travis.yml b/.travis.yml index edd6515d1d..f53ea49074 100644 --- a/.travis.yml +++ b/.travis.yml @@ -255,6 +255,18 @@ matrix: sources: - ubuntu-toolchain-r-test + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=../tools + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + - os: linux env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=../example//examples addons: @@ -267,6 +279,18 @@ matrix: sources: - ubuntu-toolchain-r-test + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=../tools + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + - os: linux env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=../example//examples addons: @@ -279,6 +303,18 @@ matrix: sources: - ubuntu-toolchain-r-test + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=../tools + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + - os: linux env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++14 TEST_SUITE=../example//examples addons: @@ -291,6 +327,18 @@ matrix: sources: - ubuntu-toolchain-r-test + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++14 TEST_SUITE=../tools + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + - os: linux env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=../example//examples addons: @@ -303,6 +351,18 @@ matrix: sources: - ubuntu-toolchain-r-test + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=../tools + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + - os: linux env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=special_fun addons: @@ -375,6 +435,18 @@ matrix: sources: - ubuntu-toolchain-r-test + - os: linux + env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=../tools + addons: + apt: + packages: + - g++-5 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + - os: linux dist: trusty compiler: g++-8 @@ -441,6 +513,19 @@ matrix: sources: - ubuntu-toolchain-r-test + - os: linux + dist: trusty + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=../tools + addons: + apt: + packages: + - g++-8 + - libgmp-dev + - libmpfr-dev + sources: + - ubuntu-toolchain-r-test + - os: linux dist: trusty compiler: g++-8 @@ -507,6 +592,19 @@ matrix: sources: - ubuntu-toolchain-r-test + - os: linux + dist: trusty + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++03 TEST_SUITE=../tools + addons: + apt: + packages: + - g++-8 + - libgmp-dev + - libmpfr-dev + sources: + - ubuntu-toolchain-r-test + - os: linux dist: trusty compiler: g++-8 @@ -562,6 +660,19 @@ matrix: sources: - ubuntu-toolchain-r-test + - os: linux + dist: trusty + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++17 TEST_SUITE=../tools + addons: + apt: + packages: + - g++-8 + - libgmp-dev + - libmpfr-dev + sources: + - ubuntu-toolchain-r-test + - os: linux compiler: clang++-6.0 env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=c++11 TEST_SUITE=special_fun @@ -617,6 +728,19 @@ matrix: - ubuntu-toolchain-r-test - llvm-toolchain-xenial-6.0 + - os: linux + compiler: clang++-6.0 + env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=c++11 TEST_SUITE=../tools + addons: + apt: + packages: + - clang-6.0 + - libgmp-dev + - libmpfr-dev + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-xenial-6.0 + - os: osx env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=special_fun osx_image: xcode11 diff --git a/tools/Jamfile.v2 b/tools/Jamfile.v2 index 5b8a4e83b9..712d500cec 100644 --- a/tools/Jamfile.v2 +++ b/tools/Jamfile.v2 @@ -9,6 +9,7 @@ # bring in the rules for testing import modules ; import path ; +import ../../config/checks/config : requires ; project : requirements @@ -34,12 +35,188 @@ project ../include_private ; +lib gmp ; +lib mpfr ; +lib mpfi ; +lib quadmath ; -for local source in [ glob *_data.cpp ] generate_test_values.cpp igamma_temme_large_coef.cpp lanczos_generator.cpp factorial_tables.cpp generate_rational_test.cpp -{ - exe $(source:B) : $(source) ; - install $(source:B)_bin : $(source:B) : bin ; -} +exe bessel_data : bessel_data.cpp ; +install bessel_data_install : bessel_data : bin ; + +exe ellint_f_data : ellint_f_data.cpp ; +install ellint_f_data_install : ellint_f_data : bin ; + +exe heuman_lambda_data : heuman_lambda_data.cpp ; +install heuman_lambda_data_install : heuman_lambda_data : bin ; + +exe hyp_2f2_data : hyp_2f2_data.cpp ; +install hyp_2f2_data_install : hyp_2f2_data : bin ; + +exe laguerre_data : laguerre_data.cpp ; +install laguerre_data_install : laguerre_data : bin ; + +exe bessel_derivative_data : bessel_derivative_data.cpp : +[ check-target-builds ../../multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds ../../multiprecision/config//has_mpfr : mpfr : no ] ; +install bessel_derivative_data_install : bessel_derivative_data : bin ; + +exe ellint_k_data : ellint_k_data.cpp ; +install ellint_k_data_install : ellint_k_data : bin ; + +exe hyp_0f2_data : hyp_0f2_data.cpp ; +install hyp_0f2_data_install : hyp_0f2_data : bin ; + +exe hypergeometric_dist_data : hypergeometric_dist_data.cpp : [ requires cxx11_hdr_random ] ; +install hypergeometric_dist_data_install : hypergeometric_dist_data : bin ; + +exe legendre_data : legendre_data.cpp ; +install legendre_data_install : legendre_data : bin ; + +exe beta_data : beta_data.cpp ; +install beta_data_install : beta_data : bin ; + +exe ellint_pi2_data : ellint_pi2_data.cpp ; +install ellint_pi2_data_install : ellint_pi2_data : bin ; + +exe hyp_1f1_big_data : hyp_1f1_big_data.cpp : +[ check-target-builds ../../multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds ../../multiprecision/config//has_mpfr : mpfr : no ] +[ check-target-builds ../../multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] +[ requires cxx11_decltype ] ; +install hyp_1f1_big_data_install : hyp_1f1_big_data : bin ; + +exe ibeta_data : ibeta_data.cpp ; +install ibeta_data_install : ibeta_data : bin ; + +exe log1p_expm1_data : log1p_expm1_data.cpp ; +install log1p_expm1_data_install : log1p_expm1_data : bin ; + +exe carlson_ellint_data : carlson_ellint_data.cpp ; +install carlson_ellint_data_install : carlson_ellint_data : bin ; + +exe ellint_pi3_data : ellint_pi3_data.cpp ; +install ellint_pi3_data_install : ellint_pi3_data : bin ; + +exe hyp_1f1_data : hyp_1f1_data.cpp : +[ check-target-builds ../../multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds ../../multiprecision/config//has_mpfr : mpfr : no ] +[ check-target-builds ../../multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] +[ requires cxx11_decltype ] ; +install hyp_1f1_data_install : hyp_1f1_data : bin ; + +exe ibeta_derivative_data : ibeta_derivative_data.cpp ; +install ibeta_derivative_data_install : ibeta_derivative_data : bin ; + +exe sinc_data : sinc_data.cpp ; +install sinc_data_install : sinc_data : bin ; + +exe cbrt_data : cbrt_data.cpp ; +install cbrt_data_install : cbrt_data : bin ; + +exe erf_data : erf_data.cpp : [ check-target-builds ../../multiprecision/config//has_float128 : quadmath : no ] ; +install erf_data_install : erf_data : bin ; + +exe hyp_1f1_log_big_data : hyp_1f1_log_big_data.cpp : +[ check-target-builds ../../multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds ../../multiprecision/config//has_mpfr : mpfr : no ] +[ check-target-builds ../../multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] +[ requires cxx11_decltype ] ; +install hyp_1f1_log_big_data_install : hyp_1f1_log_big_data : bin ; + +exe ibeta_inv_data : ibeta_inv_data.cpp : [ check-target-builds ../../multiprecision/config//has_float128 : quadmath : no ] ; +install ibeta_inv_data_install : ibeta_inv_data : bin ; + +exe spherical_harmonic_data : spherical_harmonic_data.cpp ; +install spherical_harmonic_data_install : spherical_harmonic_data : bin ; + +exe digamma_data : digamma_data.cpp : [ check-target-builds ../../multiprecision/config//has_float128 : quadmath : no ] ; +install digamma_data_install : digamma_data : bin ; + +exe expint_data : expint_data.cpp ; +install expint_data_install : expint_data : bin ; + +exe hyp_1f1_reg_big_data : hyp_1f1_reg_big_data.cpp : +[ check-target-builds ../../multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds ../../multiprecision/config//has_mpfr : mpfr : no ] +[ check-target-builds ../../multiprecision/config//has_mpfi : gmp mpfr mpfi : no ] +[ requires cxx11_decltype ] ; +install hyp_1f1_reg_big_data_install : hyp_1f1_reg_big_data : bin ; + +exe ibeta_invab_data : ibeta_invab_data.cpp : [ check-target-builds ../../multiprecision/config//has_float128 : quadmath : no ] ; +install ibeta_invab_data_install : ibeta_invab_data : bin ; + +exe tgamma_large_data : tgamma_large_data.cpp : +[ check-target-builds ../../multiprecision/config//has_gmp : gmp : no ] +[ check-target-builds ../../multiprecision/config//has_mpfr : mpfr : no ] ; +install tgamma_large_data_install : tgamma_large_data : bin ; + +exe ellint_d_data : ellint_d_data.cpp ; +install ellint_d_data_install : ellint_d_data : bin ; + +exe expint_i_data : expint_i_data.cpp ; +install expint_i_data_install : expint_i_data : bin ; + +exe hyp_1f2_data : hyp_1f2_data.cpp ; +install hyp_1f2_data_install : hyp_1f2_data : bin ; + +exe igamma_data : igamma_data.cpp : [ check-target-builds ../../multiprecision/config//has_float128 : quadmath : no ] ; +install igamma_data_install : igamma_data : bin ; + +exe tgamma_ratio_data : tgamma_ratio_data.cpp ; +install tgamma_ratio_data_install : tgamma_ratio_data : bin ; + +exe ellint_d2_data : ellint_d2_data.cpp ; +install ellint_d2_data_install : ellint_d2_data : bin ; + +exe gamma_P_inva_data : gamma_P_inva_data.cpp : [ check-target-builds ../../multiprecision/config//has_float128 : quadmath : no ] ; +install gamma_P_inva_data_install : gamma_P_inva_data : bin ; + +exe hyp_2f0_data : hyp_2f0_data.cpp ; +install hyp_2f0_data_install : hyp_2f0_data : bin ; + +exe inv_hyp_data : inv_hyp_data.cpp ; +install inv_hyp_data_install : inv_hyp_data : bin ; + +exe trig_data : trig_data.cpp ; +install trig_data_install : trig_data : bin ; + +exe ellint_e_data : ellint_e_data.cpp ; +install ellint_e_data_install : ellint_e_data : bin ; + +exe hermite_data : hermite_data.cpp ; +install hermite_data_install : hermite_data : bin ; + +exe hyp_2f1_data : hyp_2f1_data.cpp ; +install hyp_2f1_data_install : hyp_2f1_data : bin ; + +exe jacobi_zeta_data : jacobi_zeta_data.cpp ; +install jacobi_zeta_data_install : jacobi_zeta_data : bin ; + +exe zeta_data : zeta_data.cpp ; +install zeta_data_install : zeta_data : bin ; + +exe generate_test_values : generate_test_values.cpp ; +install generate_test_values_install : generate_test_values : bin ; + +exe igamma_temme_large_coef : igamma_temme_large_coef.cpp ; +install igamma_temme_large_coef_install : igamma_temme_large_coef : bin ; + +exe lanczos_generator : lanczos_generator.cpp ../../chrono/build//boost_chrono ../../system/build//boost_system : +[ check-target-builds ../../multiprecision/config//has_float128 : quadmath : no ] +[ requires cxx11_nullptr ] ; +install lanczos_generator_install : lanczos_generator : bin ; + +exe factorial_tables : factorial_tables.cpp ; +install factorial_tables_install : factorial_tables : bin ; + +exe generate_rational_test : generate_rational_test.cpp ; +install generate_rational_test_install : generate_rational_test : bin ; + +#for local source in [ glob *_data.cpp ] generate_test_values.cpp igamma_temme_large_coef.cpp lanczos_generator.cpp factorial_tables.cpp generate_rational_test.cpp +#{ +# exe $(source:B) : $(source) : [ check-target-builds ../../multiprecision/config//has_gmp : HAS_GMP gmp : no ] [ check-target-builds ../../multiprecision/config//has_mpfr : HAS_MPFR mpfr : no ] [ check-target-builds ../../multiprecision/config//has_mpfi : HAS_MPFI gmp mpfr mpfi ] ; +# install $(source:B)_bin : $(source:B) : bin ; +#} exe generate_rational_code : generate_rational_code.cpp ; exe process_perf_results : process_perf_results.cpp ../../regex/build//boost_regex ; diff --git a/tools/bessel_data.cpp b/tools/bessel_data.cpp index 6c9503587d..7ed5f0eb7d 100644 --- a/tools/bessel_data.cpp +++ b/tools/bessel_data.cpp @@ -12,9 +12,9 @@ // #include +#include "mp_t.hpp" #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/beta_data.cpp b/tools/beta_data.cpp index 2ab3336dfb..d22cf8e309 100644 --- a/tools/beta_data.cpp +++ b/tools/beta_data.cpp @@ -3,11 +3,11 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; diff --git a/tools/carlson_ellint_data.cpp b/tools/carlson_ellint_data.cpp index 5bd980733a..66dc6d005a 100644 --- a/tools/carlson_ellint_data.cpp +++ b/tools/carlson_ellint_data.cpp @@ -4,6 +4,7 @@ // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include @@ -11,7 +12,6 @@ #include #include #include -#include "mp_t.hpp" float extern_val; // confuse the compilers optimiser, and force a truncation to float precision: diff --git a/tools/cbrt_data.cpp b/tools/cbrt_data.cpp index 95c0a46f72..9ee2b59942 100644 --- a/tools/cbrt_data.cpp +++ b/tools/cbrt_data.cpp @@ -4,8 +4,8 @@ // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include -#include #include "mp_t.hpp" +#include using namespace boost::math::tools; using namespace std; diff --git a/tools/digamma_data.cpp b/tools/digamma_data.cpp index d2f7c315bd..38ace7d971 100644 --- a/tools/digamma_data.cpp +++ b/tools/digamma_data.cpp @@ -3,11 +3,11 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace std; diff --git a/tools/ellint_d2_data.cpp b/tools/ellint_d2_data.cpp index 79263711bd..d9223d146c 100644 --- a/tools/ellint_d2_data.cpp +++ b/tools/ellint_d2_data.cpp @@ -3,13 +3,13 @@ // Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/ellint_d_data.cpp b/tools/ellint_d_data.cpp index f2c30f37c3..9a56fd4af5 100644 --- a/tools/ellint_d_data.cpp +++ b/tools/ellint_d_data.cpp @@ -3,13 +3,13 @@ // Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/ellint_e_data.cpp b/tools/ellint_e_data.cpp index d68d3f2003..e761b541ff 100644 --- a/tools/ellint_e_data.cpp +++ b/tools/ellint_e_data.cpp @@ -3,12 +3,12 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/ellint_f_data.cpp b/tools/ellint_f_data.cpp index 4ecc4f0102..0e816f7149 100644 --- a/tools/ellint_f_data.cpp +++ b/tools/ellint_f_data.cpp @@ -3,12 +3,12 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/ellint_k_data.cpp b/tools/ellint_k_data.cpp index 8f58cb0dc4..11e6f5d826 100644 --- a/tools/ellint_k_data.cpp +++ b/tools/ellint_k_data.cpp @@ -3,12 +3,12 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/ellint_pi2_data.cpp b/tools/ellint_pi2_data.cpp index e7b63ec4d3..d9ad7fd765 100644 --- a/tools/ellint_pi2_data.cpp +++ b/tools/ellint_pi2_data.cpp @@ -3,13 +3,13 @@ // Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/ellint_pi3_data.cpp b/tools/ellint_pi3_data.cpp index bc09d9cfd5..2c0aee38ad 100644 --- a/tools/ellint_pi3_data.cpp +++ b/tools/ellint_pi3_data.cpp @@ -6,13 +6,13 @@ // or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include #include #include -#include "mp_t.hpp" float extern_val; // confuse the compilers optimiser, and force a truncation to float precision: diff --git a/tools/erf_data.cpp b/tools/erf_data.cpp index b2e76b803f..4e8ebcadc1 100644 --- a/tools/erf_data.cpp +++ b/tools/erf_data.cpp @@ -3,12 +3,12 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include // for inverses #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace std; diff --git a/tools/expint_data.cpp b/tools/expint_data.cpp index e34e3b5492..b99c64923d 100644 --- a/tools/expint_data.cpp +++ b/tools/expint_data.cpp @@ -3,11 +3,11 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; diff --git a/tools/expint_i_data.cpp b/tools/expint_i_data.cpp index f8b6166ae2..c5d3c4a68f 100644 --- a/tools/expint_i_data.cpp +++ b/tools/expint_i_data.cpp @@ -3,11 +3,11 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; diff --git a/tools/gamma_P_inva_data.cpp b/tools/gamma_P_inva_data.cpp index 6f12bc5e92..38de47139f 100644 --- a/tools/gamma_P_inva_data.cpp +++ b/tools/gamma_P_inva_data.cpp @@ -3,12 +3,12 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; diff --git a/tools/generate_rational_test.cpp b/tools/generate_rational_test.cpp index 7093906df3..7fa82c40c8 100644 --- a/tools/generate_rational_test.cpp +++ b/tools/generate_rational_test.cpp @@ -6,11 +6,11 @@ #define BOOST_MATH_POLY_METHOD 0 #define BOOST_MATH_RATIONAL_METHOD 0 +#include "mp_t.hpp" #include #include #include #include -#include "mp_t.hpp" int main() { diff --git a/tools/hermite_data.cpp b/tools/hermite_data.cpp index 156a725432..e96a45b64b 100644 --- a/tools/hermite_data.cpp +++ b/tools/hermite_data.cpp @@ -3,10 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/heuman_lambda_data.cpp b/tools/heuman_lambda_data.cpp index 44aa3803b6..af27e4d892 100644 --- a/tools/heuman_lambda_data.cpp +++ b/tools/heuman_lambda_data.cpp @@ -3,13 +3,13 @@ // Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/hyp_0f2_data.cpp b/tools/hyp_0f2_data.cpp index 6bdaedb254..a954265392 100644 --- a/tools/hyp_0f2_data.cpp +++ b/tools/hyp_0f2_data.cpp @@ -5,13 +5,13 @@ #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 10000000 +#include "mp_t.hpp" #include #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/hyp_1f1_big_data.cpp b/tools/hyp_1f1_big_data.cpp index 4bef9d2ff4..e767e242cd 100644 --- a/tools/hyp_1f1_big_data.cpp +++ b/tools/hyp_1f1_big_data.cpp @@ -5,6 +5,8 @@ #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 10000000 +#define BOOST_MATH_USE_MPFR +#include "mp_t.hpp" #include #include #include @@ -12,8 +14,6 @@ #include #include #include -#define BOOST_MATH_USE_MPFR -#include "mp_t.hpp" #include diff --git a/tools/hyp_1f1_data.cpp b/tools/hyp_1f1_data.cpp index 0205b42b30..bdcb3b47da 100644 --- a/tools/hyp_1f1_data.cpp +++ b/tools/hyp_1f1_data.cpp @@ -5,6 +5,7 @@ #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 10000000 +#include "mp_t.hpp" #include #include #include @@ -12,7 +13,6 @@ #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; @@ -22,10 +22,11 @@ struct hypergeometric_1f1_gen { mp_t operator()(mp_t a1, mp_t a2, mp_t z) { + int scaling = 0; std::cout << a1 << " " << a2 << " " << z << std::endl; - mp_t result = boost::math::detail::hypergeometric_1f1_generic_series(a1, a2, z, boost::math::policies::policy<>()); + mp_t result = boost::math::detail::hypergeometric_1F1_generic_series(a1, a2, z, boost::math::policies::policy<>(), scaling, ""); std::cout << a1 << " " << a2 << " " << z << " " << result << std::endl; - return result; + return ldexp(result, scaling); } }; @@ -33,7 +34,9 @@ struct hypergeometric_1f1_gen_2 { mp_t operator()(mp_t a1, mp_t a2, mp_t z) { - mp_t result = boost::math::detail::hypergeometric_1f1_generic_series(a1, a2, z, boost::math::policies::policy<>()); + int scaling = 0; + mp_t result = boost::math::detail::hypergeometric_1F1_generic_series(a1, a2, z, boost::math::policies::policy<>(), scaling, ""); + result = ldexp(result, scaling); std::cout << a1 << " " << a2 << " " << z << " " << result << std::endl; if (fabs(result) > (std::numeric_limits::max)()) { diff --git a/tools/hyp_1f1_log_big_data.cpp b/tools/hyp_1f1_log_big_data.cpp index ab8b09e480..3ec8594e21 100644 --- a/tools/hyp_1f1_log_big_data.cpp +++ b/tools/hyp_1f1_log_big_data.cpp @@ -5,6 +5,8 @@ #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 10000000 +#define BOOST_MATH_USE_MPFR +#include "mp_t.hpp" #include #include #include @@ -13,8 +15,6 @@ #include #include #include -#define BOOST_MATH_USE_MPFR -#include "mp_t.hpp" #include diff --git a/tools/hyp_1f1_reg_big_data.cpp b/tools/hyp_1f1_reg_big_data.cpp index 6989547e7d..1a702b9120 100644 --- a/tools/hyp_1f1_reg_big_data.cpp +++ b/tools/hyp_1f1_reg_big_data.cpp @@ -4,7 +4,8 @@ // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 10000000 - +#define BOOST_MATH_USE_MPFR +#include "mp_t.hpp" #include #include #include @@ -13,8 +14,6 @@ #include #include #include -#define BOOST_MATH_USE_MPFR -#include "mp_t.hpp" #include diff --git a/tools/hyp_1f2_data.cpp b/tools/hyp_1f2_data.cpp index c3ebee3dc2..75fadfc225 100644 --- a/tools/hyp_1f2_data.cpp +++ b/tools/hyp_1f2_data.cpp @@ -5,13 +5,13 @@ #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 10000000 +#include "mp_t.hpp" #include #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/hyp_2f0_data.cpp b/tools/hyp_2f0_data.cpp index a750dff510..119052f057 100644 --- a/tools/hyp_2f0_data.cpp +++ b/tools/hyp_2f0_data.cpp @@ -3,14 +3,14 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#include +#include "mp_t.hpp" +#include #include #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; @@ -21,7 +21,7 @@ struct hypergeometric_2f0_gen mp_t operator()(mp_t a1, mp_t a2, mp_t z) { std::cout << a1 << " " << a2 << " " << z << std::endl; - mp_t result = boost::math::detail::hypergeometric_2f0_generic_series(a1, a2, z, boost::math::policies::policy<>()); + mp_t result = boost::math::detail::hypergeometric_2F0_generic_series(a1, a2, z, boost::math::policies::policy<>()); std::cout << a1 << " " << a2 << " " << z << " " << result << std::endl; return result; } @@ -31,7 +31,7 @@ struct hypergeometric_2f0_gen_spec1 { boost::math::tuple operator()(mp_t a1, mp_t z) { - mp_t result = boost::math::detail::hypergeometric_2f0_generic_series(a1, a1 + 0.5, z, boost::math::policies::policy<>()); + mp_t result = boost::math::detail::hypergeometric_2F0_generic_series(a1, a1 + 0.5, z, boost::math::policies::policy<>()); std::cout << a1 << " " << a1 + 0.5 << " " << z << " " << result << std::endl; return boost::math::make_tuple(a1, a1 + 0.5, z, result); } diff --git a/tools/hyp_2f1_data.cpp b/tools/hyp_2f1_data.cpp index c742e74379..7978e2bdc0 100644 --- a/tools/hyp_2f1_data.cpp +++ b/tools/hyp_2f1_data.cpp @@ -5,13 +5,13 @@ #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 10000000 +#include "mp_t.hpp" #include #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/hyp_2f2_data.cpp b/tools/hyp_2f2_data.cpp index 378db1cd3a..e86f9ba39d 100644 --- a/tools/hyp_2f2_data.cpp +++ b/tools/hyp_2f2_data.cpp @@ -5,13 +5,13 @@ #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 10000000 +#include "mp_t.hpp" #include #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/hypergeometric_dist_data.cpp b/tools/hypergeometric_dist_data.cpp index 55352f03a1..52386192a6 100644 --- a/tools/hypergeometric_dist_data.cpp +++ b/tools/hypergeometric_dist_data.cpp @@ -5,6 +5,7 @@ //#define BOOST_MATH_INSTRUMENT +#include "mp_t.hpp" #include #include #include @@ -12,7 +13,6 @@ #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; diff --git a/tools/ibeta_data.cpp b/tools/ibeta_data.cpp index 5d906b7195..357422b4a9 100644 --- a/tools/ibeta_data.cpp +++ b/tools/ibeta_data.cpp @@ -3,6 +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) +#include "mp_t.hpp" #include #include #include @@ -11,7 +12,6 @@ #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/ibeta_derivative_data.cpp b/tools/ibeta_derivative_data.cpp index 80e019076d..69716d2b53 100644 --- a/tools/ibeta_derivative_data.cpp +++ b/tools/ibeta_derivative_data.cpp @@ -3,6 +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) +#include "mp_t.hpp" #include #include #include @@ -11,7 +12,6 @@ #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/ibeta_inv_data.cpp b/tools/ibeta_inv_data.cpp index f41d2a1e09..1fa9d0e45b 100644 --- a/tools/ibeta_inv_data.cpp +++ b/tools/ibeta_inv_data.cpp @@ -3,13 +3,13 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; diff --git a/tools/ibeta_invab_data.cpp b/tools/ibeta_invab_data.cpp index 8830bd41ca..fb00a2e4d0 100644 --- a/tools/ibeta_invab_data.cpp +++ b/tools/ibeta_invab_data.cpp @@ -3,13 +3,13 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; diff --git a/tools/igamma_data.cpp b/tools/igamma_data.cpp index ad4b2179e1..20d513fed8 100644 --- a/tools/igamma_data.cpp +++ b/tools/igamma_data.cpp @@ -3,12 +3,12 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; diff --git a/tools/igamma_temme_large_coef.cpp b/tools/igamma_temme_large_coef.cpp index 1f5e0c330c..229c8137ca 100644 --- a/tools/igamma_temme_large_coef.cpp +++ b/tools/igamma_temme_large_coef.cpp @@ -3,13 +3,13 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include #include #include -#include "mp_t.hpp" using namespace std; using namespace boost::math; diff --git a/tools/inv_hyp_data.cpp b/tools/inv_hyp_data.cpp index cff496bf36..b24b3578db 100644 --- a/tools/inv_hyp_data.cpp +++ b/tools/inv_hyp_data.cpp @@ -3,10 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace std; diff --git a/tools/jacobi_zeta_data.cpp b/tools/jacobi_zeta_data.cpp index ded6523018..07a8feb294 100644 --- a/tools/jacobi_zeta_data.cpp +++ b/tools/jacobi_zeta_data.cpp @@ -3,13 +3,13 @@ // Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/laguerre_data.cpp b/tools/laguerre_data.cpp index b1777b153f..aacb7d023e 100644 --- a/tools/laguerre_data.cpp +++ b/tools/laguerre_data.cpp @@ -3,12 +3,12 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/lanczos_generator.cpp b/tools/lanczos_generator.cpp index 10a8390f91..dc752eab12 100644 --- a/tools/lanczos_generator.cpp +++ b/tools/lanczos_generator.cpp @@ -3,6 +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) +#include "mp_t.hpp" #include #include #include @@ -17,7 +18,6 @@ #include #include #include -#include "mp_t.hpp" // // Define MP_TYPE diff --git a/tools/legendre_data.cpp b/tools/legendre_data.cpp index b011c77eaa..c5ef30ad6c 100644 --- a/tools/legendre_data.cpp +++ b/tools/legendre_data.cpp @@ -3,12 +3,12 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/log1p_expm1_data.cpp b/tools/log1p_expm1_data.cpp index 3ccdd01aa0..687dd64c26 100644 --- a/tools/log1p_expm1_data.cpp +++ b/tools/log1p_expm1_data.cpp @@ -4,10 +4,10 @@ // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include +#include "mp_t.hpp" #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace std; diff --git a/tools/rational_tests.cpp b/tools/rational_tests.cpp index 67f1ca0c13..929ad4795d 100644 --- a/tools/rational_tests.cpp +++ b/tools/rational_tests.cpp @@ -3,11 +3,11 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include -#include "mp_t.hpp" int main() { diff --git a/tools/sinc_data.cpp b/tools/sinc_data.cpp index 02cc61c97c..cef666bfa2 100644 --- a/tools/sinc_data.cpp +++ b/tools/sinc_data.cpp @@ -3,11 +3,11 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace std; diff --git a/tools/spherical_harmonic_data.cpp b/tools/spherical_harmonic_data.cpp index 2c04823e47..d13674e46f 100644 --- a/tools/spherical_harmonic_data.cpp +++ b/tools/spherical_harmonic_data.cpp @@ -3,11 +3,11 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace boost::math; diff --git a/tools/tgamma_large_data.cpp b/tools/tgamma_large_data.cpp index dbf6ef3439..651245a40b 100644 --- a/tools/tgamma_large_data.cpp +++ b/tools/tgamma_large_data.cpp @@ -48,7 +48,11 @@ int cpp_main(int argc, char*argv []) return 1; arg1.type |= dummy_param; - data.insert(&generate, arg1); + typedef boost::math::tuple(*proc_type)(mp_type); + + proc_type p = &generate; + + data.insert(p, arg1); std::cout << "Any more data [y/n]?"; std::getline(std::cin, line); diff --git a/tools/tgamma_ratio_data.cpp b/tools/tgamma_ratio_data.cpp index 3f4e67223d..119aa43a70 100644 --- a/tools/tgamma_ratio_data.cpp +++ b/tools/tgamma_ratio_data.cpp @@ -3,10 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace std; diff --git a/tools/trig_data.cpp b/tools/trig_data.cpp index 41233578f1..6c8f209648 100644 --- a/tools/trig_data.cpp +++ b/tools/trig_data.cpp @@ -3,10 +3,10 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace std; diff --git a/tools/zeta_data.cpp b/tools/zeta_data.cpp index 55c87c979d..26ac7ca647 100644 --- a/tools/zeta_data.cpp +++ b/tools/zeta_data.cpp @@ -3,11 +3,11 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#include "mp_t.hpp" #include #include #include #include -#include "mp_t.hpp" using namespace boost::math::tools; using namespace std;