From 26711525cab5d753ba956824383c88879df0715d Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Sun, 21 Mar 2021 16:13:10 +0300 Subject: [PATCH] Remove uses of boost/cstdint without header called --- doc/graphs/dist_graphs.cpp | 4 +- doc/graphs/sf_graphs.cpp | 2 +- doc/internals/fraction.qbk | 8 ++-- doc/internals/recurrence.qbk | 8 ++-- doc/internals/relative_error.qbk | 2 +- doc/internals/series.qbk | 10 ++--- doc/internals/test_data.qbk | 2 +- doc/roots/minima.qbk | 2 +- doc/roots/roots.qbk | 8 ++-- doc/roots/roots_without_derivatives.qbk | 32 +++++++------- doc/sf/number_series.qbk | 4 +- .../barycentric_interpolation_example_2.cpp | 4 +- example/big_seventh.cpp | 6 +-- example/brent_minimise_example.cpp | 44 +++++++++---------- example/continued_fractions.cpp | 2 +- .../daubechies_scaling_integer_grid.cpp | 2 +- example/handle_test_result.hpp | 12 ++--- .../inverse_chi_squared_find_df_example.cpp | 2 +- example/root_elliptic_finding.cpp | 20 ++++----- example/root_finding_algorithms.cpp | 22 +++++----- example/root_finding_example.cpp | 18 ++++---- example/root_finding_fifth.cpp | 22 +++++----- .../root_finding_multiprecision_example.cpp | 8 ++-- example/root_finding_n_example.cpp | 4 +- example/root_finding_start_locations.cpp | 44 +++++++++---------- example/root_n_finding_algorithms.cpp | 20 ++++----- example/series.cpp | 4 +- include/boost/math/distributions/binomial.hpp | 2 +- .../boost/math/distributions/chi_squared.hpp | 2 +- .../distributions/detail/generic_mode.hpp | 4 +- .../distributions/detail/generic_quantile.hpp | 2 +- .../detail/inv_discrete_quantile.hpp | 16 +++---- .../math/distributions/inverse_gaussian.hpp | 4 +- .../math/distributions/kolmogorov_smirnov.hpp | 4 +- .../math/distributions/negative_binomial.hpp | 4 +- .../math/distributions/non_central_beta.hpp | 28 ++++++------ .../distributions/non_central_chi_squared.hpp | 26 +++++------ .../math/distributions/non_central_t.hpp | 16 +++---- include/boost/math/distributions/poisson.hpp | 4 +- .../boost/math/distributions/skew_normal.hpp | 4 +- .../boost/math/distributions/students_t.hpp | 2 +- include/boost/math/special_functions/airy.hpp | 8 ++-- .../boost/math/special_functions/bessel.hpp | 6 +-- include/boost/math/special_functions/beta.hpp | 4 +- .../detail/bernoulli_details.hpp | 2 +- .../special_functions/detail/bessel_ik.hpp | 2 +- .../detail/bessel_jy_derivatives_series.hpp | 4 +- .../detail/bessel_jy_series.hpp | 4 +- .../detail/bessel_jy_zero.hpp | 8 ++-- .../math/special_functions/detail/erf_inv.hpp | 2 +- ...ergeometric_1F1_addition_theorems_on_z.hpp | 12 ++--- .../detail/hypergeometric_1F1_bessel.hpp | 10 ++--- .../detail/hypergeometric_1F1_by_ratios.hpp | 8 ++-- .../detail/hypergeometric_1F1_cf.hpp | 2 +- .../detail/hypergeometric_1F1_large_abz.hpp | 12 ++--- .../detail/hypergeometric_1F1_recurrence.hpp | 24 +++++----- ...metric_1F1_small_a_negative_b_by_ratio.hpp | 2 +- .../detail/hypergeometric_cf.hpp | 2 +- .../hypergeometric_separated_series.hpp | 2 +- .../detail/hypergeometric_series.hpp | 2 +- .../detail/ibeta_inverse.hpp | 2 +- .../detail/igamma_inverse.hpp | 4 +- .../boost/math/special_functions/digamma.hpp | 2 +- include/boost/math/special_functions/erf.hpp | 4 +- .../boost/math/special_functions/expint.hpp | 6 +-- .../boost/math/special_functions/gamma.hpp | 6 +-- .../special_functions/hypergeometric_0F1.hpp | 2 +- .../special_functions/hypergeometric_2F0.hpp | 12 ++--- .../special_functions/hypergeometric_pFq.hpp | 6 +-- .../boost/math/special_functions/legendre.hpp | 2 +- .../special_functions/legendre_stieltjes.hpp | 2 +- include/boost/math/special_functions/next.hpp | 8 ++-- include/boost/math/special_functions/zeta.hpp | 2 +- include/boost/math/tools/precision.hpp | 4 +- include/boost/math/tools/recurrence.hpp | 8 ++-- include_private/boost/math/tools/remez.hpp | 2 +- include_private/boost/math/tools/test.hpp | 2 +- minimax/f.cpp | 2 +- .../performance/doc/performance_tables.qbk | 10 ++--- reporting/performance/fibonacci.hpp | 42 +++++++++--------- reporting/performance/table_helper.cpp | 20 ++++----- reporting/performance/test_distributions.cpp | 2 +- reporting/performance/test_poly_method.cpp | 28 ++++++------ reporting/performance/test_polynomial.cpp | 2 +- test/compile_test/sf_prime_incl_test.cpp | 6 +-- test/compile_test/tools_roots_inc_test.cpp | 2 +- test/compile_test/tools_series_inc_test.cpp | 2 +- test/compile_test/tools_toms748_inc_test.cpp | 6 +-- test/handle_test_result.hpp | 12 ++--- test/test_bessel_airy_zeros.cpp | 4 +- test/test_next.cpp | 2 +- test/test_next_decimal.cpp | 2 +- test/test_recurrence.cpp | 4 +- test/test_root_finding_concepts.cpp | 2 +- test/test_root_iterations.cpp | 2 +- test/test_tgamma_for_issue396_part1.cpp | 6 +-- test/test_tgamma_for_issue396_part2.cpp | 6 +-- test/test_toms748_solve.cpp | 12 ++--- tools/hypergeometric_1F1_error_plot.cpp | 6 +-- ...geometric_1F1_map_neg_b_fwd_recurrence.cpp | 10 ++--- tools/lanczos_generator.cpp | 16 +++---- 101 files changed, 415 insertions(+), 415 deletions(-) diff --git a/doc/graphs/dist_graphs.cpp b/doc/graphs/dist_graphs.cpp index 6a8da07e7..ca88c9e08 100644 --- a/doc/graphs/dist_graphs.cpp +++ b/doc/graphs/dist_graphs.cpp @@ -118,7 +118,7 @@ public: // if(a <= -(std::numeric_limits::max)()) { - boost::uintmax_t max_iter = 500; + std::uintmax_t max_iter = 500; double guess = mod; if((pdf(d, 0) > min_y) || (guess == 0)) guess = -1e-3; @@ -132,7 +132,7 @@ public: } if(b >= (std::numeric_limits::max)()) { - boost::uintmax_t max_iter = 500; + std::uintmax_t max_iter = 500; double guess = mod; if(a <= 0) if((pdf(d, 0) > min_y) || (guess == 0)) diff --git a/doc/graphs/sf_graphs.cpp b/doc/graphs/sf_graphs.cpp index 290ea4e28..bfcfd3cf2 100644 --- a/doc/graphs/sf_graphs.cpp +++ b/doc/graphs/sf_graphs.cpp @@ -234,7 +234,7 @@ template double find_end_point(F f, double x0, double target, bool rising, double x_off = 0) { boost::math::tools::eps_tolerance tol(50); - boost::uintmax_t max_iter = 1000; + std::uintmax_t max_iter = 1000; return x_off + boost::math::tools::bracket_and_solve_root( location_finder(f, target, x_off), x0, diff --git a/doc/internals/fraction.qbk b/doc/internals/fraction.qbk index b01ca8601..88d5e7869 100644 --- a/doc/internals/fraction.qbk +++ b/doc/internals/fraction.qbk @@ -10,7 +10,7 @@ template typename detail::fraction_traits::result_type - continued_fraction_b(Gen& g, const U& tolerance, boost::uintmax_t& max_terms) + continued_fraction_b(Gen& g, const U& tolerance, std::uintmax_t& max_terms) template typename detail::fraction_traits::result_type @@ -18,7 +18,7 @@ template typename detail::fraction_traits::result_type - continued_fraction_a(Gen& g, const U& tolerance, boost::uintmax_t& max_terms) + continued_fraction_a(Gen& g, const U& tolerance, std::uintmax_t& max_terms) template typename detail::fraction_traits::result_type @@ -33,7 +33,7 @@ template typename detail::fraction_traits::result_type - continued_fraction_b(Gen& g, int bits, boost::uintmax_t& max_terms); + continued_fraction_b(Gen& g, int bits, std::uintmax_t& max_terms); template typename detail::fraction_traits::result_type @@ -41,7 +41,7 @@ template typename detail::fraction_traits::result_type - continued_fraction_a(Gen& g, int bits, boost::uintmax_t& max_terms); + continued_fraction_a(Gen& g, int bits, std::uintmax_t& max_terms); }}} // namespaces diff --git a/doc/internals/recurrence.qbk b/doc/internals/recurrence.qbk index bce521ebe..c709c25b5 100644 --- a/doc/internals/recurrence.qbk +++ b/doc/internals/recurrence.qbk @@ -9,10 +9,10 @@ namespace boost{ namespace math{ namespace tools{ template - T function_ratio_from_backwards_recurrence(const Recurrence& r, const T& factor, boost::uintmax_t& max_iter); + T function_ratio_from_backwards_recurrence(const Recurrence& r, const T& factor, std::uintmax_t& max_iter); template - T function_ratio_from_forwards_recurrence(const Recurrence& r, const T& factor, boost::uintmax_t& max_iter); + T function_ratio_from_forwards_recurrence(const Recurrence& r, const T& factor, std::uintmax_t& max_iter); template T apply_recurrence_relation_forward(const NextCoefs& get_coefs, unsigned number_of_steps, T first, T second, long long* log_scaling = 0, T* previous = 0); @@ -64,7 +64,7 @@ And this could be encoded as: The tools are then as follows: template - T function_ratio_from_backwards_recurrence(const Recurrence& r, const T& factor, boost::uintmax_t& max_iter); + T function_ratio_from_backwards_recurrence(const Recurrence& r, const T& factor, std::uintmax_t& max_iter); Given a functor `r` which encodes the recurrence relation for function `F` at some location /n/, then returns the ratio: @@ -80,7 +80,7 @@ the recurrence relation, and should be no smaller than machine epsilon. Argumen the maximum number of permitted iterations in the associated continued fraction. template - T function_ratio_from_forwards_recurrence(const Recurrence& r, const T& factor, boost::uintmax_t& max_iter); + T function_ratio_from_forwards_recurrence(const Recurrence& r, const T& factor, std::uintmax_t& max_iter); Given a functor `r` which encodes the recurrence relation for function F at some location /n/, then returns the ratio: diff --git a/doc/internals/relative_error.qbk b/doc/internals/relative_error.qbk index 83976fba5..7fc2207cd 100644 --- a/doc/internals/relative_error.qbk +++ b/doc/internals/relative_error.qbk @@ -47,7 +47,7 @@ caused the largest relative error. Public members of type test_result are: [[`T min()const;`][Returns the smallest relative error found.]] [[`T max()const;`][Returns the largest relative error found.]] [[`T mean()const;`][Returns the mean error found.]] -[[`boost::uintmax_t count()const;`][Returns the number of test cases.]] +[[`std::uintmax_t count()const;`][Returns the number of test cases.]] [[`T variance()const;`][Returns the variance of the errors found.]] [[`T variance1()const;`][Returns the unbiased variance of the errors found.]] [[`T rms()const`][Returns the Root Mean Square, or quadratic mean of the errors.]] diff --git a/doc/internals/series.qbk b/doc/internals/series.qbk index e9e6253cf..2a2e34906 100644 --- a/doc/internals/series.qbk +++ b/doc/internals/series.qbk @@ -9,10 +9,10 @@ namespace boost{ namespace math{ namespace tools{ template - inline typename Functor::result_type sum_series(Functor& func, const U& tolerance, boost::uintmax_t& max_terms, const V& init_value); + inline typename Functor::result_type sum_series(Functor& func, const U& tolerance, std::uintmax_t& max_terms, const V& init_value); template - inline typename Functor::result_type sum_series(Functor& func, const U& tolerance, boost::uintmax_t& max_terms); + inline typename Functor::result_type sum_series(Functor& func, const U& tolerance, std::uintmax_t& max_terms); // // The following interfaces are now deprecated: @@ -21,19 +21,19 @@ typename Functor::result_type sum_series(Functor& func, int bits); template - typename Functor::result_type sum_series(Functor& func, int bits, boost::uintmax_t& max_terms); + typename Functor::result_type sum_series(Functor& func, int bits, std::uintmax_t& max_terms); template typename Functor::result_type sum_series(Functor& func, int bits, U init_value); template - typename Functor::result_type sum_series(Functor& func, int bits, boost::uintmax_t& max_terms, U init_value); + typename Functor::result_type sum_series(Functor& func, int bits, std::uintmax_t& max_terms, U init_value); template typename Functor::result_type kahan_sum_series(Functor& func, int bits); template - typename Functor::result_type kahan_sum_series(Functor& func, int bits, boost::uintmax_t& max_terms); + typename Functor::result_type kahan_sum_series(Functor& func, int bits, std::uintmax_t& max_terms); }}} // namespaces diff --git a/doc/internals/test_data.qbk b/doc/internals/test_data.qbk index 9c02567dc..aade5cc90 100644 --- a/doc/internals/test_data.qbk +++ b/doc/internals/test_data.qbk @@ -356,7 +356,7 @@ for each element in the tuple (in addition to the input parameters): // // Now get the approximation at double precision, along with the number of // iterations required: - boost::uintmax_t iters = std::numeric_limits::max(); + std::uintmax_t iters = std::numeric_limits::max(); upper_incomplete_gamma_fract f2(val, val); T found_val = continued_fraction_a(f2, std::numeric_limits::digits, iters); // diff --git a/doc/roots/minima.qbk b/doc/roots/minima.qbk index 57fa4e906..4cb8d23c9 100644 --- a/doc/roots/minima.qbk +++ b/doc/roots/minima.qbk @@ -13,7 +13,7 @@ std::pair brent_find_minima(F f, T min, T max, int bits); template - std::pair brent_find_minima(F f, T min, T max, int bits, boost::uintmax_t& max_iter); + std::pair brent_find_minima(F f, T min, T max, int bits, std::uintmax_t& max_iter); [h4 Description] diff --git a/doc/roots/roots.qbk b/doc/roots/roots.qbk index 04c7d3175..61f6549e1 100644 --- a/doc/roots/roots.qbk +++ b/doc/roots/roots.qbk @@ -13,21 +13,21 @@ T newton_raphson_iterate(F f, T guess, T min, T max, int digits); template - T newton_raphson_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter); + T newton_raphson_iterate(F f, T guess, T min, T max, int digits, std::uintmax_t& max_iter); // Halley template T halley_iterate(F f, T guess, T min, T max, int digits); template - T halley_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter); + T halley_iterate(F f, T guess, T min, T max, int digits, std::uintmax_t& max_iter); // Schr'''ö'''der template T schroder_iterate(F f, T guess, T min, T max, int digits); template - T schroder_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter); + T schroder_iterate(F f, T guess, T min, T max, int digits, std::uintmax_t& max_iter); template Complex complex_newton(F f, Complex guess, int max_iterations = std::numeric_limits::digits); @@ -73,7 +73,7 @@ Schr'''ö'''der) When using these functions you should note that: -* Default `max_iter = (std::numeric_limits::max)()` is effectively 'iterate for ever'. +* Default `max_iter = (std::numeric_limits::max)()` is effectively 'iterate for ever'. * They may be very sensitive to the initial guess, typically they converge very rapidly if the initial guess has two or three decimal digits correct. However convergence can be no better than __bisect, or in some rare cases, even worse than __bisect if the diff --git a/doc/roots/roots_without_derivatives.qbk b/doc/roots/roots_without_derivatives.qbk index d8575d0a9..5c82ef415 100644 --- a/doc/roots/roots_without_derivatives.qbk +++ b/doc/roots/roots_without_derivatives.qbk @@ -16,7 +16,7 @@ T min, T max, Tol tol, - boost::uintmax_t& max_iter); + std::uintmax_t& max_iter); template std::pair @@ -33,7 +33,7 @@ T min, T max, Tol tol, - boost::uintmax_t& max_iter, + std::uintmax_t& max_iter, const ``__Policy``&); // Bracket and Solve Root @@ -45,7 +45,7 @@ const T& factor, bool rising, Tol tol, - boost::uintmax_t& max_iter); + std::uintmax_t& max_iter); template std::pair @@ -55,7 +55,7 @@ const T& factor, bool rising, Tol tol, - boost::uintmax_t& max_iter, + std::uintmax_t& max_iter, const ``__Policy``&); // TOMS 748 algorithm @@ -66,7 +66,7 @@ const T& a, const T& b, Tol tol, - boost::uintmax_t& max_iter); + std::uintmax_t& max_iter); template std::pair @@ -75,7 +75,7 @@ const T& a, const T& b, Tol tol, - boost::uintmax_t& max_iter, + std::uintmax_t& max_iter, const ``__Policy``&); template @@ -87,7 +87,7 @@ const T& fa, const T& fb, Tol tol, - boost::uintmax_t& max_iter); + std::uintmax_t& max_iter); template std::pair @@ -98,7 +98,7 @@ const T& fa, const T& fb, Tol tol, - boost::uintmax_t& max_iter, + std::uintmax_t& max_iter, const ``__Policy``&); // Termination conditions: @@ -163,7 +163,7 @@ only rarely, but may be useful in some specific circumstances. T min, T max, Tol tol, - boost::uintmax_t& max_iter); + std::uintmax_t& max_iter); template std::pair @@ -172,7 +172,7 @@ only rarely, but may be useful in some specific circumstances. T min, T max, Tol tol, - boost::uintmax_t& max_iter, + std::uintmax_t& max_iter, const ``__Policy``&); These functions locate the root using __bisection_wikipedia. @@ -227,7 +227,7 @@ because the termination condition ['tol] was satisfied. const T& factor, bool rising, Tol tol, - boost::uintmax_t& max_iter); + std::uintmax_t& max_iter); template std::pair @@ -237,7 +237,7 @@ because the termination condition ['tol] was satisfied. const T& factor, bool rising, Tol tol, - boost::uintmax_t& max_iter, + std::uintmax_t& max_iter, const ``__Policy``&); `bracket_and_solve_root` is a convenience function that calls __root_finding_TOMS748 internally @@ -315,7 +315,7 @@ because the termination condition ['tol] was satisfied. const T& a, const T& b, Tol tol, - boost::uintmax_t& max_iter); + std::uintmax_t& max_iter); template std::pair @@ -324,7 +324,7 @@ because the termination condition ['tol] was satisfied. const T& a, const T& b, Tol tol, - boost::uintmax_t& max_iter, + std::uintmax_t& max_iter, const ``__Policy``&); template @@ -336,7 +336,7 @@ because the termination condition ['tol] was satisfied. const T& fa, const T& fb, Tol tol, - boost::uintmax_t& max_iter); + std::uintmax_t& max_iter); template std::pair @@ -347,7 +347,7 @@ because the termination condition ['tol] was satisfied. const T& fa, const T& fb, Tol tol, - boost::uintmax_t& max_iter, + std::uintmax_t& max_iter, const ``__Policy``&); These functions implement TOMS Algorithm 748: it uses a mixture of diff --git a/doc/sf/number_series.qbk b/doc/sf/number_series.qbk index 970b3c793..2e0f0ef2c 100644 --- a/doc/sf/number_series.qbk +++ b/doc/sf/number_series.qbk @@ -239,9 +239,9 @@ refer to the __bernoulli_numbers documentation for details. namespace boost { namespace math { template - constexpr boost::uint32_t prime(unsigned n, const Policy& pol); + constexpr std::uint32_t prime(unsigned n, const Policy& pol); - constexpr boost::uint32_t prime(unsigned n); + constexpr std::uint32_t prime(unsigned n); static const unsigned max_prime = 10000; diff --git a/example/barycentric_interpolation_example_2.cpp b/example/barycentric_interpolation_example_2.cpp index 4128f95ba..aefea4ea8 100644 --- a/example/barycentric_interpolation_example_2.cpp +++ b/example/barycentric_interpolation_example_2.cpp @@ -82,13 +82,13 @@ int main() // the abscissa value that yields 3, not zero. We pass the functor b by value to the // lambda expression since barycentric_rational is trivial to copy. // Here we're using simple bisection to find the root: - boost::uintmax_t iterations = (std::numeric_limits::max)(); + std::uintmax_t iterations = (std::numeric_limits::max)(); double abscissa_3 = boost::math::tools::bisect([=](double x) { return b(x) - 3; }, 0.44, 1.24, boost::math::tools::eps_tolerance(), iterations).first; std::cout << "Abscissa value that yields a potential of 3 = " << abscissa_3 << std::endl; std::cout << "Root was found in " << iterations << " iterations." << std::endl; // // However, we have a more efficient root finding algorithm than simple bisection: - iterations = (std::numeric_limits::max)(); + iterations = (std::numeric_limits::max)(); abscissa_3 = boost::math::tools::bracket_and_solve_root([=](double x) { return b(x) - 3; }, 0.6, 1.2, false, boost::math::tools::eps_tolerance(), iterations).first; std::cout << "Abscissa value that yields a potential of 3 = " << abscissa_3 << std::endl; std::cout << "Root was found in " << iterations << " iterations." << std::endl; diff --git a/example/big_seventh.cpp b/example/big_seventh.cpp index 7f3a3b0d9..9d647a25b 100644 --- a/example/big_seventh.cpp +++ b/example/big_seventh.cpp @@ -57,10 +57,10 @@ void no_et() std::cout.setf(std::ios_base::boolalpha); - typedef number, et_on> cpp_bin_float_quad_et_on; - typedef number, et_off> cpp_bin_float_quad_et_off; + typedef number, et_on> cpp_bin_float_quad_et_on; + typedef number, et_off> cpp_bin_float_quad_et_off; - typedef number, et_off> cpp_bin_float_oct; + typedef number, et_off> cpp_bin_float_oct; cpp_bin_float_quad x("42."); diff --git a/example/brent_minimise_example.cpp b/example/brent_minimise_example.cpp index 09053bd03..41132ba52 100644 --- a/example/brent_minimise_example.cpp +++ b/example/brent_minimise_example.cpp @@ -141,8 +141,8 @@ void show_minima() << "\n Displaying to std::numeric_limits::digits10 " << prec << ", significant decimal digits." << std::endl; - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; // Construct using string, not double, avoids loss of precision. //T bracket_min = static_cast("-4"); //T bracket_max = static_cast("1.3333333333333333333333333333333333333333333333333"); @@ -237,8 +237,8 @@ int main() // Specific type double - limit maxit to 20 iterations. std::cout << "Precision bits = " << bits << std::endl; //[brent_minimise_double_2 - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; std::pair r = brent_find_minima(funcdouble(), -4., 4. / 3, bits, it); std::cout << "x at minimum = " << r.first << ", f(" << r.first << ") = " << r.second << " after " << it << " iterations. " << std::endl; @@ -273,8 +273,8 @@ int main() << " decimal digits from tolerance " << sqrt(epsilon_2) << std::endl; std::streamsize precision_4 = std::cout.precision(prec); // Save. - const boost::uintmax_t maxit = 20; - boost::uintmax_t it_4 = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it_4 = maxit; std::pair r = brent_find_minima(funcdouble(), -4., 4. / 3, bits_div_2, it_4); std::cout << "x at minimum = " << r.first << ", f(" << r.first << ") = " << r.second << std::endl; std::cout << it_4 << " iterations. " << std::endl; @@ -294,9 +294,9 @@ int main() << " decimal digits from tolerance " << sqrt(epsilon_4) << std::endl; std::streamsize precision_5 = std::cout.precision(prec); // Save & set. - const boost::uintmax_t maxit = 20; + const std::uintmax_t maxit = 20; - boost::uintmax_t it_5 = maxit; + std::uintmax_t it_5 = maxit; std::pair r = brent_find_minima(funcdouble(), -4., 4. / 3, bits_div_4, it_5); std::cout << "x at minimum = " << r.first << ", f(" << r.first << ") = " << r.second << ", after " << it_5 << " iterations. " << std::endl; @@ -316,8 +316,8 @@ int main() long double bracket_min = -4.; long double bracket_max = 4. / 3; const int bits = std::numeric_limits::digits; - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; std::pair r = brent_find_minima(func(), bracket_min, bracket_max, bits, it); std::cout << "x at minimum = " << r.first << ", f(" << r.first << ") = " << r.second @@ -380,8 +380,8 @@ int main() cpp_bin_float_50 bracket_max = static_cast("1.3333333333333333333333333333333333333333333333333"); std::cout << "Bracketing " << bracket_min << " to " << bracket_max << std::endl; - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; // Will be updated with actual iteration count. + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; // Will be updated with actual iteration count. std::pair r = brent_find_minima(func(), bracket_min, bracket_max, bits, it); @@ -432,8 +432,8 @@ f(0.99999999999999999999999999998813903221565569205253) = cpp_bin_float_50_et_on bracket_max = static_cast("1.3333333333333333333333333333333333333333333333333"); std::cout << bracket_min << " " << bracket_max << std::endl; - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; std::pair r = brent_find_minima(func(), bracket_min, bracket_max, bits, it); std::cout << "x at minimum = " << r.first << ", f(" << r.first << ") = " << r.second << std::endl; @@ -455,8 +455,8 @@ f(0.99999999999999999999999999998813903221565569205253) = cpp_bin_float_50_et_off bracket_max = static_cast("1.3333333333333333333333333333333333333333333333333"); std::cout << bracket_min << " " << bracket_max << std::endl; - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; std::pair r = brent_find_minima(func(), bracket_min, bracket_max, bits, it); std::cout << "x at minimum = " << r.first << ", f(" << r.first << ") = " << r.second << std::endl; @@ -475,8 +475,8 @@ f(0.99999999999999999999999999998813903221565569205253) = cpp_dec_float_50 bracket_max = static_cast("1.3333333333333333333333333333333333333333333333333"); std::cout << bracket_min << " " << bracket_max << std::endl; - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; std::pair r = brent_find_minima(func(), bracket_min, bracket_max, bits, it); std::cout << "x at minimum = " << r.first << ", f(" << r.first << ") = " << r.second << std::endl; @@ -494,8 +494,8 @@ f(0.99999999999999999999999999998813903221565569205253) = cpp_dec_float_50_et_on bracket_min = static_cast("-4"); cpp_dec_float_50_et_on bracket_max = static_cast("1.3333333333333333333333333333333333333333333333333"); std::cout << bracket_min << " " << bracket_max << std::endl; - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; std::pair r = brent_find_minima(func(), bracket_min, bracket_max, bits, it); std::cout << "x at minimum = " << r.first << ", f(" << r.first << ") = " << r.second << std::endl; @@ -515,8 +515,8 @@ f(0.99999999999999999999999999998813903221565569205253) = cpp_dec_float_50_et_off bracket_max = static_cast("1.3333333333333333333333333333333333333333333333333"); std::cout << bracket_min << " " << bracket_max << std::endl; - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; std::pair r = brent_find_minima(func(), bracket_min, bracket_max, bits, it); std::cout << "x at minimum = " << r.first << ", f(" << r.first << ") = " << r.second << std::endl; diff --git a/example/continued_fractions.cpp b/example/continued_fractions.cpp index 23f479fc9..852a8e672 100644 --- a/example/continued_fractions.cpp +++ b/example/continued_fractions.cpp @@ -72,7 +72,7 @@ private: template inline std::complex expint_as_fraction(unsigned n, std::complex const& z) { - boost::uintmax_t max_iter = 1000; + std::uintmax_t max_iter = 1000; expint_fraction > f(n, z); std::complex result = boost::math::tools::continued_fraction_b( f, diff --git a/example/daubechies_wavelets/daubechies_scaling_integer_grid.cpp b/example/daubechies_wavelets/daubechies_scaling_integer_grid.cpp index c06bad5f1..e376560f4 100644 --- a/example/daubechies_wavelets/daubechies_scaling_integer_grid.cpp +++ b/example/daubechies_wavelets/daubechies_scaling_integer_grid.cpp @@ -26,7 +26,7 @@ #include #include -typedef boost::multiprecision::number, boost::int32_t, -262142, 262143>, boost::multiprecision::et_off> octuple_type; +typedef boost::multiprecision::number, std::int32_t, -262142, 262143>, boost::multiprecision::et_off> octuple_type; #ifdef BOOST_HAS_FLOAT128 typedef boost::multiprecision::float128 float128_t; diff --git a/example/handle_test_result.hpp b/example/handle_test_result.hpp index cb1432a58..8e98f3743 100644 --- a/example/handle_test_result.hpp +++ b/example/handle_test_result.hpp @@ -25,7 +25,7 @@ // void expected_results(); -typedef std::pair > expected_data_type; +typedef std::pair > expected_data_type; typedef std::list list_type; inline list_type& @@ -42,8 +42,8 @@ inline void add_expected_result( const char* type_name, const char* test_name, const char* group_name, - boost::uintmax_t max_peek_error, - boost::uintmax_t max_mean_error) + std::uintmax_t max_peek_error, + std::uintmax_t max_mean_error) { std::string re("(?:"); re += compiler; @@ -89,10 +89,10 @@ inline std::string build_test_name(const char* type_name, const char* test_name, return result; } -inline const std::pair& +inline const std::pair& get_max_errors(const char* type_name, const char* test_name, const char* group_name) { - static const std::pair defaults(1, 1); + static const std::pair defaults(1, 1); std::string name = build_test_name(type_name, test_name, group_name); list_type& l = get_expected_data(); list_type::const_iterator a(l.begin()), b(l.end()); @@ -165,7 +165,7 @@ void handle_test_result(const boost::math::tools::test_result& result, // // Now verify that the results are within our expected bounds: // - std::pair const& bounds = get_max_errors(type_name, test_name, group_name); + std::pair const& bounds = get_max_errors(type_name, test_name, group_name); if(bounds.first < max_error_found) { std::cerr << "Peak error greater than expected value of " << bounds.first << std::endl; diff --git a/example/inverse_chi_squared_find_df_example.cpp b/example/inverse_chi_squared_find_df_example.cpp index ea0f932dc..1bdbb9f2a 100644 --- a/example/inverse_chi_squared_find_df_example.cpp +++ b/example/inverse_chi_squared_find_df_example.cpp @@ -64,7 +64,7 @@ int main() } //template std::pair - // bracket_and_solve_root(F f, const T& guess, T factor, bool rising, Tol tol, boost::uintmax_t& max_iter, const Policy& pol) + // bracket_and_solve_root(F f, const T& guess, T factor, bool rising, Tol tol, std::uintmax_t& max_iter, const Policy& pol) //double df = inverse_chi_squared_distribution<>::find_degrees_of_freedom(diff, alpha, beta, variance, 0); diff --git a/example/root_elliptic_finding.cpp b/example/root_elliptic_finding.cpp index 28305c77a..4a60bd4a6 100644 --- a/example/root_elliptic_finding.cpp +++ b/example/root_elliptic_finding.cpp @@ -134,9 +134,9 @@ struct root_info int get_digits; // fraction of maximum possible accuracy required. // = digits * digits_accuracy // Vector of values (4) for each algorithm, TOMS748, Newton, Halley & Schroder. - //std::vector< boost::int_least64_t> times; converted to int. + //std::vector< std::int_least64_t> times; converted to int. std::vector times; // arbitrary units (ticks). - //boost::int_least64_t min_time = std::numeric_limits::max(); // Used to normalize times (as int). + //std::int_least64_t min_time = std::numeric_limits::max(); // Used to normalize times (as int). std::vector normed_times; int min_time = (std::numeric_limits::max)(); // Used to normalize times. std::vector iterations; @@ -203,8 +203,8 @@ T elliptic_root_noderiv(T radius, T arc) T guess = sqrt(arc * arc / 16 - radius * radius); T factor = 1.2; // How big steps to take when searching. - const boost::uintmax_t maxit = 50; // Limit to maximum iterations. - boost::uintmax_t it = maxit; // Initially our chosen max iterations, but updated with actual. + const std::uintmax_t maxit = 50; // Limit to maximum iterations. + std::uintmax_t it = maxit; // Initially our chosen max iterations, but updated with actual. bool is_rising = true; // arc-length increases if one radii increases, so function is rising // Define a termination condition, stop when nearly all digits are correct, but allow for // the fact that we are returning a range, and must have some inaccuracy in the elliptic integral: @@ -268,8 +268,8 @@ T elliptic_root_1deriv(T radius, T arc) // Accuracy doubles at each step, so stop when just over half of the digits are // correct, and rely on that step to polish off the remainder: int get_digits = static_cast(std::numeric_limits::digits * 0.6); - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; T result = newton_raphson_iterate(elliptic_root_functor_1deriv(arc, radius), guess, min, max, get_digits, it); //<- iters = it; @@ -326,8 +326,8 @@ T elliptic_root_2deriv(T radius, T arc) // Accuracy triples at each step, so stop when just over one-third of the digits // are correct, and the last iteration will polish off the remaining digits: int get_digits = static_cast(std::numeric_limits::digits * 0.4); - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; T result = halley_iterate(elliptic_root_functor_2deriv(arc, radius), guess, min, max, get_digits, it); //<- iters = it; @@ -352,8 +352,8 @@ T elliptic_root_2deriv_s(T arc, T radius) int digits = std::numeric_limits::digits; // Maximum possible binary digits accuracy for type T. int get_digits = static_cast(digits * digits_accuracy); - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; T result = schroder_iterate(elliptic_root_functor_2deriv(arc, radius), guess, min, max, get_digits, it); iters = it; diff --git a/example/root_finding_algorithms.cpp b/example/root_finding_algorithms.cpp index c51439072..389d33510 100644 --- a/example/root_finding_algorithms.cpp +++ b/example/root_finding_algorithms.cpp @@ -141,11 +141,11 @@ struct root_info int get_digits; // fraction of maximum possible accuracy required. // = digits * digits_accuracy // Vector of values for each algorithm, std::cbrt, boost::math::cbrt, TOMS748, Newton, Halley. - //std::vector< boost::int_least64_t> times; converted to int. + //std::vector< std::int_least64_t> times; converted to int. std::vector times; - //boost::int_least64_t min_time = std::numeric_limits::max(); // Used to normalize times (as int). + //std::int_least64_t min_time = std::numeric_limits::max(); // Used to normalize times (as int). std::vector normed_times; - boost::int_least64_t min_time = (std::numeric_limits::max)(); // Used to normalize times. + std::int_least64_t min_time = (std::numeric_limits::max)(); // Used to normalize times. std::vector iterations; std::vector distances; std::vector full_results; @@ -215,8 +215,8 @@ T cbrt_noderiv(T x) T factor = 2; // How big steps to take when searching. - const boost::uintmax_t maxit = 50; // Limit to maximum iterations. - boost::uintmax_t it = maxit; // Initially our chosen max iterations, but updated with actual. + const std::uintmax_t maxit = 50; // Limit to maximum iterations. + std::uintmax_t it = maxit; // Initially our chosen max iterations, but updated with actual. bool is_rising = true; // So if result if guess^3 is too low, then try increasing guess. // Some fraction of digits is used to control how accurate to try to make the result. int get_digits = static_cast(std::numeric_limits::digits - 2); @@ -265,8 +265,8 @@ T cbrt_deriv(T x) T min = guess / 2; // Minimum possible value is half our guess. T max = 2 * guess; // Maximum possible value is twice our guess. int get_digits = static_cast(std::numeric_limits::digits * 0.6); - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; T result = newton_raphson_iterate(cbrt_functor_deriv(x), guess, min, max, get_digits, it); iters = it; return result; @@ -310,8 +310,8 @@ T cbrt_2deriv(T x) T max = 2 * guess; // Maximum possible value is twice our guess. // digits used to control how accurate to try to make the result. int get_digits = static_cast(std::numeric_limits::digits * 0.4); - boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; T result = halley_iterate(cbrt_functor_2deriv(x), guess, min, max, get_digits, it); iters = it; return result; @@ -337,8 +337,8 @@ T cbrt_2deriv_s(T x) T max = 2 * guess; // Maximum possible value is twice our guess. // digits used to control how accurate to try to make the result. int get_digits = static_cast(std::numeric_limits::digits * 0.4); - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; T result = schroder_iterate(cbrt_functor_2deriv(x), guess, min, max, get_digits, it); iters = it; return result; diff --git a/example/root_finding_example.cpp b/example/root_finding_example.cpp index c1f0f63ee..724bd5e36 100644 --- a/example/root_finding_example.cpp +++ b/example/root_finding_example.cpp @@ -127,8 +127,8 @@ T cbrt_noderiv(T x) T guess = ldexp(1., exponent/3); // Rough guess is to divide the exponent by three. T factor = 2; // How big steps to take when searching. - const boost::uintmax_t maxit = 20; // Limit to maximum iterations. - boost::uintmax_t it = maxit; // Initially our chosen max iterations, but updated with actual. + const std::uintmax_t maxit = 20; // Limit to maximum iterations. + std::uintmax_t it = maxit; // Initially our chosen max iterations, but updated with actual. bool is_rising = true; // So if result if guess^3 is too low, then try increasing guess. int digits = std::numeric_limits::digits; // Maximum possible binary digits accuracy for type T. // Some fraction of digits is used to control how accurate to try to make the result. @@ -145,7 +145,7 @@ T cbrt_noderiv(T x) /*` [note The final parameter specifying a maximum number of iterations is optional. -However, it defaults to `boost::uintmax_t maxit = (std::numeric_limits::max)();` +However, it defaults to `std::uintmax_t maxit = (std::numeric_limits::max)();` which is `18446744073709551615` and is more than anyone would wish to wait for! So it may be wise to chose some reasonable estimate of how many iterations may be needed, @@ -235,8 +235,8 @@ T cbrt_deriv(T x) const int digits = std::numeric_limits::digits; // Maximum possible binary digits accuracy for type T. int get_digits = static_cast(digits * 0.6); // Accuracy doubles with each step, so stop when we have // just over half the digits correct. - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; T result = newton_raphson_iterate(cbrt_functor_deriv(x), guess, min, max, get_digits, it); return result; } @@ -295,7 +295,7 @@ T cbrt_2deriv(T x) // digits used to control how accurate to try to make the result. int get_digits = static_cast(digits * 0.4); // Accuracy triples with each step, so stop when just // over one third of the digits are correct. - boost::uintmax_t maxit = 20; + std::uintmax_t maxit = 20; T result = halley_iterate(cbrt_functor_2deriv(x), guess, min, max, get_digits, maxit); return result; } @@ -319,7 +319,7 @@ T cbrt_2deriv_lambda(T x) // digits used to control how accurate to try to make the result. int get_digits = static_cast(digits * 0.4); // Accuracy triples with each step, so stop when just // over one third of the digits are correct. - boost::uintmax_t maxit = 20; + std::uintmax_t maxit = 20; T result = halley_iterate( // lambda function: [x](const T& g){ return std::make_tuple(g * g * g - x, 3 * g * g, 6 * g); }, @@ -421,8 +421,8 @@ T fifth_2deriv(T x) T max = ldexp(2., exponent / 5); // Maximum possible value is twice our guess. // Stop when slightly more than one of the digits are correct: const int digits = static_cast(std::numeric_limits::digits * 0.4); - const boost::uintmax_t maxit = 50; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 50; + std::uintmax_t it = maxit; T result = halley_iterate(fifth_functor_2deriv(x), guess, min, max, digits, it); return result; } diff --git a/example/root_finding_fifth.cpp b/example/root_finding_fifth.cpp index 6c9811475..d9e1cc5c9 100644 --- a/example/root_finding_fifth.cpp +++ b/example/root_finding_fifth.cpp @@ -172,18 +172,18 @@ T fifth_noderiv(T x) // int digits = 3 * std::numeric_limits::digits / 4; // 3/4 maximum possible binary digits accuracy for type T. int digits = std::numeric_limits::digits; // Maximum possible binary digits accuracy for type T. - //boost::uintmax_t maxit = (std::numeric_limits::max)(); - // (std::numeric_limits::max)() = 18446744073709551615 + //std::uintmax_t maxit = (std::numeric_limits::max)(); + // (std::numeric_limits::max)() = 18446744073709551615 // which is more than anyone might wish to wait for!!! // so better to choose some reasonable estimate of how many iterations may be needed. - const boost::uintmax_t maxit = 50; // Chosen max iterations, + const std::uintmax_t maxit = 50; // Chosen max iterations, // but updated on exit with actual iteration count. // We could also have used a maximum iterations provided by any policy: - // boost::uintmax_t max_it = policies::get_max_root_iterations(); + // std::uintmax_t max_it = policies::get_max_root_iterations(); - boost::uintmax_t it = maxit; // Initially our chosen max iterations, + std::uintmax_t it = maxit; // Initially our chosen max iterations, bool is_rising = true; // So if result if guess^5 is too low, try increasing guess. eps_tolerance tol(digits); @@ -289,8 +289,8 @@ T fifth_1deriv(T x) // digits used to control how accurate to try to make the result. int digits = std::numeric_limits::digits; // Maximum possible binary digits accuracy for type T. - const boost::uintmax_t maxit = 20; // Optionally limit the number of iterations. - boost::uintmax_t it = maxit; // limit the number of iterations. + const std::uintmax_t maxit = 20; // Optionally limit the number of iterations. + std::uintmax_t it = maxit; // limit the number of iterations. //cout << "Max Iterations " << maxit << endl; // T result = newton_raphson_iterate(fifth_functor_1stderiv(x), guess, min, max, digits, it); // Can check and show how many iterations (updated by newton_raphson_iterate). @@ -302,8 +302,8 @@ T fifth_1deriv(T x) // int get_digits = (digits * 2) /3; // Two thirds of maximum possible accuracy. -//boost::uintmax_t maxit = (std::numeric_limits::max)(); -// the default (std::numeric_limits::max)() = 18446744073709551615 +//std::uintmax_t maxit = (std::numeric_limits::max)(); +// the default (std::numeric_limits::max)() = 18446744073709551615 // which is more than we might wish to wait for!!! so we can reduce it /*` @@ -357,8 +357,8 @@ T fifth_2deriv(T x) T max = ldexp(2., exponent / 5); // Maximum possible value is twice our guess. int digits = std::numeric_limits::digits / 2; // Half maximum possible binary digits accuracy for type T. - const boost::uintmax_t maxit = 50; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 50; + std::uintmax_t it = maxit; T result = halley_iterate(fifth_functor_2deriv(x), guess, min, max, digits, it); // Can show how many iterations (updated by halley_iterate). cout << it << " iterations (from max of " << maxit << ")" << endl; diff --git a/example/root_finding_multiprecision_example.cpp b/example/root_finding_multiprecision_example.cpp index 0b1452ba1..8c9d4f946 100644 --- a/example/root_finding_multiprecision_example.cpp +++ b/example/root_finding_multiprecision_example.cpp @@ -69,8 +69,8 @@ T cbrt_2deriv(T x) #endif int digits = std::numeric_limits::digits / 2; // Half maximum possible binary digits accuracy for type T. - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; T result = halley_iterate(cbrt_functor_2deriv(x), guess, min, max, digits, it); // Can show how many iterations (updated by halley_iterate). // std::cout << "Iterations " << it << " (from max of "<< maxit << ")." << std::endl; @@ -135,8 +135,8 @@ T nth_2deriv(T x) T max = ldexp(static_cast(2.), exponent / n); // Maximum possible value is twice our guess. int digits = std::numeric_limits::digits / 2; // Half maximum possible binary digits accuracy for type T. - const boost::uintmax_t maxit = 50; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 50; + std::uintmax_t it = maxit; T result = halley_iterate(nth_functor_2deriv(x), guess, min, max, digits, it); // Can show how many iterations (updated by halley_iterate). std::cout << it << " iterations (from max of " << maxit << ")" << std::endl; diff --git a/example/root_finding_n_example.cpp b/example/root_finding_n_example.cpp index f04bd1f0f..5cf7aa864 100644 --- a/example/root_finding_n_example.cpp +++ b/example/root_finding_n_example.cpp @@ -105,8 +105,8 @@ T nth_2deriv(T x) int digits = std::numeric_limits::digits * 0.4; // Accuracy triples with each step, so stop when // slightly more than one third of the digits are correct. - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; T result = halley_iterate(nth_functor_2deriv(x), guess, min, max, digits, it); return result; } diff --git a/example/root_finding_start_locations.cpp b/example/root_finding_start_locations.cpp index b4f50e1ee..cc848312a 100644 --- a/example/root_finding_start_locations.cpp +++ b/example/root_finding_start_locations.cpp @@ -34,7 +34,7 @@ private: //] [/root_finding_noderiv_1 template -boost::uintmax_t cbrt_noderiv(T x, T guess) +std::uintmax_t cbrt_noderiv(T x, T guess) { // return cube root of x using bracket_and_solve (no derivatives). using namespace std; // Help ADL of std functions. @@ -42,8 +42,8 @@ boost::uintmax_t cbrt_noderiv(T x, T guess) T factor = 2; // How big steps to take when searching. - const boost::uintmax_t maxit = 20; // Limit to maximum iterations. - boost::uintmax_t it = maxit; // Initially our chosen max iterations, but updated with actual. + const std::uintmax_t maxit = 20; // Limit to maximum iterations. + std::uintmax_t it = maxit; // Initially our chosen max iterations, but updated with actual. bool is_rising = true; // So if result if guess^3 is too low, then try increasing guess. int digits = std::numeric_limits::digits; // Maximum possible binary digits accuracy for type T. // Some fraction of digits is used to control how accurate to try to make the result. @@ -75,7 +75,7 @@ private: }; template -boost::uintmax_t cbrt_deriv(T x, T guess) +std::uintmax_t cbrt_deriv(T x, T guess) { // return cube root of x using 1st derivative and Newton_Raphson. using namespace boost::math::tools; @@ -84,8 +84,8 @@ boost::uintmax_t cbrt_deriv(T x, T guess) const int digits = std::numeric_limits::digits; // Maximum possible binary digits accuracy for type T. int get_digits = static_cast(digits * 0.6); // Accuracy doubles with each step, so stop when we have // just over half the digits correct. - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; newton_raphson_iterate(cbrt_functor_deriv(x), guess, min, max, get_digits, it); return it; } @@ -111,7 +111,7 @@ private: }; template -boost::uintmax_t cbrt_2deriv(T x, T guess) +std::uintmax_t cbrt_2deriv(T x, T guess) { // return cube root of x using 1st and 2nd derivatives and Halley. //using namespace std; // Help ADL of std functions. @@ -122,13 +122,13 @@ boost::uintmax_t cbrt_2deriv(T x, T guess) // digits used to control how accurate to try to make the result. int get_digits = static_cast(digits * 0.4); // Accuracy triples with each step, so stop when just // over one third of the digits are correct. - boost::uintmax_t maxit = 20; + std::uintmax_t maxit = 20; halley_iterate(cbrt_functor_2deriv(x), guess, min, max, get_digits, maxit); return maxit; } template -boost::uintmax_t cbrt_2deriv_s(T x, T guess) +std::uintmax_t cbrt_2deriv_s(T x, T guess) { // return cube root of x using 1st and 2nd derivatives and Halley. //using namespace std; // Help ADL of std functions. @@ -139,7 +139,7 @@ boost::uintmax_t cbrt_2deriv_s(T x, T guess) // digits used to control how accurate to try to make the result. int get_digits = static_cast(digits * 0.4); // Accuracy triples with each step, so stop when just // over one third of the digits are correct. - boost::uintmax_t maxit = 20; + std::uintmax_t maxit = 20; schroder_iterate(cbrt_functor_2deriv(x), guess, min, max, get_digits, maxit); return maxit; } @@ -165,15 +165,15 @@ private: }; // template struct elliptic_root_functor_noderiv template -boost::uintmax_t elliptic_root_noderiv(T radius, T arc, T guess) +std::uintmax_t elliptic_root_noderiv(T radius, T arc, T guess) { // return the other radius of an ellipse, given one radii and the arc-length using namespace std; // Help ADL of std functions. using namespace boost::math::tools; // For bracket_and_solve_root. T factor = 2; // How big steps to take when searching. - const boost::uintmax_t maxit = 50; // Limit to maximum iterations. - boost::uintmax_t it = maxit; // Initially our chosen max iterations, but updated with actual. + const std::uintmax_t maxit = 50; // Limit to maximum iterations. + std::uintmax_t it = maxit; // Initially our chosen max iterations, but updated with actual. bool is_rising = true; // arc-length increases if one radii increases, so function is rising // Define a termination condition, stop when nearly all digits are correct, but allow for // the fact that we are returning a range, and must have some inaccuracy in the elliptic integral: @@ -215,7 +215,7 @@ private: }; // struct elliptic_root__functor_1deriv template -boost::uintmax_t elliptic_root_1deriv(T radius, T arc, T guess) +std::uintmax_t elliptic_root_1deriv(T radius, T arc, T guess) { using namespace std; // Help ADL of std functions. using namespace boost::math::tools; // For newton_raphson_iterate. @@ -228,8 +228,8 @@ boost::uintmax_t elliptic_root_1deriv(T radius, T arc, T guess) // Accuracy doubles at each step, so stop when just over half of the digits are // correct, and rely on that step to polish off the remainder: int get_digits = static_cast(std::numeric_limits::digits * 0.6); - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; newton_raphson_iterate(elliptic_root_functor_1deriv(arc, radius), guess, min, max, get_digits, it); return it; } @@ -264,7 +264,7 @@ private: }; template -boost::uintmax_t elliptic_root_2deriv(T radius, T arc, T guess) +std::uintmax_t elliptic_root_2deriv(T radius, T arc, T guess) { using namespace std; // Help ADL of std functions. using namespace boost::math::tools; // For halley_iterate. @@ -277,8 +277,8 @@ boost::uintmax_t elliptic_root_2deriv(T radius, T arc, T guess) // Accuracy triples at each step, so stop when just over one-third of the digits // are correct, and the last iteration will polish off the remaining digits: int get_digits = static_cast(std::numeric_limits::digits * 0.4); - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; halley_iterate(elliptic_root_functor_2deriv(arc, radius), guess, min, max, get_digits, it); return it; } // nth_2deriv Halley @@ -286,7 +286,7 @@ boost::uintmax_t elliptic_root_2deriv(T radius, T arc, T guess) // Using 1st and 2nd derivatives using Schroder algorithm. template -boost::uintmax_t elliptic_root_2deriv_s(T radius, T arc, T guess) +std::uintmax_t elliptic_root_2deriv_s(T radius, T arc, T guess) { // return nth root of x using 1st and 2nd derivatives and Schroder. using namespace std; // Help ADL of std functions. @@ -299,8 +299,8 @@ boost::uintmax_t elliptic_root_2deriv_s(T radius, T arc, T guess) int digits = std::numeric_limits::digits; // Maximum possible binary digits accuracy for type T. int get_digits = static_cast(digits * 0.4); - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; schroder_iterate(elliptic_root_functor_2deriv(arc, radius), guess, min, max, get_digits, it); return it; } // T elliptic_root_2deriv_s Schroder diff --git a/example/root_n_finding_algorithms.cpp b/example/root_n_finding_algorithms.cpp index 35a1adc78..0cf2a7c71 100644 --- a/example/root_n_finding_algorithms.cpp +++ b/example/root_n_finding_algorithms.cpp @@ -135,9 +135,9 @@ struct root_info int get_digits; // fraction of maximum possible accuracy required. // = digits * digits_accuracy // Vector of values (4) for each algorithm, TOMS748, Newton, Halley & Schroder. - //std::vector< boost::int_least64_t> times; converted to int. + //std::vector< std::int_least64_t> times; converted to int. std::vector times; // arbitrary units (ticks). - //boost::int_least64_t min_time = std::numeric_limits::max(); // Used to normalize times (as int). + //std::int_least64_t min_time = std::numeric_limits::max(); // Used to normalize times (as int). std::vector normed_times; int min_time = (std::numeric_limits::max)(); // Used to normalize times. std::vector iterations; @@ -205,8 +205,8 @@ T nth_root_noderiv(T x) T factor = 2; // How big steps to take when searching. - const boost::uintmax_t maxit = 50; // Limit to maximum iterations. - boost::uintmax_t it = maxit; // Initially our chosen max iterations, but updated with actual. + const std::uintmax_t maxit = 50; // Limit to maximum iterations. + std::uintmax_t it = maxit; // Initially our chosen max iterations, but updated with actual. bool is_rising = true; // So if result if guess^3 is too low, then try increasing guess. // Some fraction of digits is used to control how accurate to try to make the result. int get_digits = std::numeric_limits::digits - 2; @@ -260,8 +260,8 @@ T nth_root_1deriv(T x) int digits = std::numeric_limits::digits; // Maximum possible binary digits accuracy for type T. int get_digits = static_cast(digits * 0.6); - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; T result = newton_raphson_iterate(nth_root_functor_1deriv(x), guess, min, max, get_digits, it); iters = it; return result; @@ -312,8 +312,8 @@ T nth_root_2deriv(T x) int digits = std::numeric_limits::digits; // Maximum possible binary digits accuracy for type T. int get_digits = static_cast(digits * 0.4); - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; T result = halley_iterate(nth_root_functor_2deriv(x), guess, min, max, get_digits, it); iters = it; @@ -340,8 +340,8 @@ T nth_root_2deriv_s(T x) T max = static_cast(ldexp(static_cast(2.), exponent / N)); // Maximum possible value is twice our guess. int get_digits = static_cast(std::numeric_limits::digits * 0.4); - const boost::uintmax_t maxit = 20; - boost::uintmax_t it = maxit; + const std::uintmax_t maxit = 20; + std::uintmax_t it = maxit; T result = schroder_iterate(nth_root_functor_2deriv(x), guess, min, max, get_digits, it); iters = it; diff --git a/example/series.cpp b/example/series.cpp index 2563532d4..648f4ee02 100644 --- a/example/series.cpp +++ b/example/series.cpp @@ -47,7 +47,7 @@ T log1p(T x) // Construct the series functor: log1p_series s(x); // Set a limit on how many iterations we permit: - boost::uintmax_t max_iter = 1000; + std::uintmax_t max_iter = 1000; // Add it up, with enough precision for full machine precision: return boost::math::tools::sum_series(s, std::numeric_limits::epsilon(), max_iter); } @@ -89,7 +89,7 @@ std::complex log1p(std::complex x) // Construct the series functor: log1p_series > s(x); // Set a limit on how many iterations we permit: - boost::uintmax_t max_iter = 1000; + std::uintmax_t max_iter = 1000; // Add it up, with enough precision for full machine precision: return boost::math::tools::sum_series(s, std::complex(std::numeric_limits::epsilon()), max_iter); } diff --git a/include/boost/math/distributions/binomial.hpp b/include/boost/math/distributions/binomial.hpp index 5cf033d73..47c97b17e 100644 --- a/include/boost/math/distributions/binomial.hpp +++ b/include/boost/math/distributions/binomial.hpp @@ -261,7 +261,7 @@ namespace boost factor = 2; // trials largish, but in far tails. typedef typename Policy::discrete_quantile_type discrete_quantile_type; - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); return detail::inverse_discrete_quantile( dist, comp ? q : p, diff --git a/include/boost/math/distributions/chi_squared.hpp b/include/boost/math/distributions/chi_squared.hpp index 071c7756f..1250a9a85 100644 --- a/include/boost/math/distributions/chi_squared.hpp +++ b/include/boost/math/distributions/chi_squared.hpp @@ -340,7 +340,7 @@ RealType chi_squared_distribution::find_degrees_of_freedom( detail::df_estimator f(alpha, beta, variance, difference_from_variance); tools::eps_tolerance tol(policies::digits()); - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); std::pair r = tools::bracket_and_solve_root(f, hint, RealType(2), false, tol, max_iter, Policy()); RealType result = r.first + (r.second - r.first) / 2; diff --git a/include/boost/math/distributions/detail/generic_mode.hpp b/include/boost/math/distributions/detail/generic_mode.hpp index 3857c9f2e..96d21b9b0 100644 --- a/include/boost/math/distributions/detail/generic_mode.hpp +++ b/include/boost/math/distributions/detail/generic_mode.hpp @@ -72,7 +72,7 @@ typename Dist::value_type generic_find_mode(const Dist& dist, typename Dist::val v = pdf(dist, lower_bound); }while(maxval < v); - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); value_type result = tools::brent_find_minima( pdf_minimizer(dist), @@ -125,7 +125,7 @@ typename Dist::value_type generic_find_mode_01(const Dist& dist, typename Dist:: v = pdf(dist, lower_bound); }while(maxval < v); - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); value_type result = tools::brent_find_minima( pdf_minimizer(dist), diff --git a/include/boost/math/distributions/detail/generic_quantile.hpp b/include/boost/math/distributions/detail/generic_quantile.hpp index afde2cacb..f7852f8fc 100644 --- a/include/boost/math/distributions/detail/generic_quantile.hpp +++ b/include/boost/math/distributions/detail/generic_quantile.hpp @@ -72,7 +72,7 @@ typename Dist::value_type generic_quantile(const Dist& dist, const typename Dist generic_quantile_finder f(dist, p, comp); tools::eps_tolerance tol(policies::digits() - 3); - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); std::pair ir = tools::bracket_and_solve_root( f, guess, value_type(2), true, tol, max_iter, forwarding_policy()); value_type result = ir.first + (ir.second - ir.first) / 2; diff --git a/include/boost/math/distributions/detail/inv_discrete_quantile.hpp b/include/boost/math/distributions/detail/inv_discrete_quantile.hpp index 23e00b8e0..80137a40f 100644 --- a/include/boost/math/distributions/detail/inv_discrete_quantile.hpp +++ b/include/boost/math/distributions/detail/inv_discrete_quantile.hpp @@ -78,7 +78,7 @@ typename Dist::value_type const typename Dist::value_type& multiplier, typename Dist::value_type adder, const Tolerance& tol, - boost::uintmax_t& max_iter) + std::uintmax_t& max_iter) { typedef typename Dist::value_type value_type; typedef typename Dist::policy_type policy_type; @@ -100,7 +100,7 @@ typename Dist::value_type guess = min_bound; value_type fa = f(guess); - boost::uintmax_t count = max_iter - 1; + std::uintmax_t count = max_iter - 1; value_type fb(fa), a(guess), b =0; // Compiler warning C4701: potentially uninitialized local variable 'b' used if(fa == 0) @@ -370,7 +370,7 @@ inline typename Dist::value_type const typename Dist::value_type& multiplier, const typename Dist::value_type& adder, const policies::discrete_quantile&, - boost::uintmax_t& max_iter) + std::uintmax_t& max_iter) { if(p > 0.5) { @@ -401,7 +401,7 @@ inline typename Dist::value_type const typename Dist::value_type& multiplier, const typename Dist::value_type& adder, const policies::discrete_quantile&, - boost::uintmax_t& max_iter) + std::uintmax_t& max_iter) { typedef typename Dist::value_type value_type; BOOST_MATH_STD_USING @@ -444,7 +444,7 @@ inline typename Dist::value_type const typename Dist::value_type& multiplier, const typename Dist::value_type& adder, const policies::discrete_quantile&, - boost::uintmax_t& max_iter) + std::uintmax_t& max_iter) { typedef typename Dist::value_type value_type; BOOST_MATH_STD_USING @@ -487,7 +487,7 @@ inline typename Dist::value_type const typename Dist::value_type& multiplier, const typename Dist::value_type& adder, const policies::discrete_quantile&, - boost::uintmax_t& max_iter) + std::uintmax_t& max_iter) { typedef typename Dist::value_type value_type; BOOST_MATH_STD_USING @@ -515,7 +515,7 @@ inline typename Dist::value_type const typename Dist::value_type& multiplier, const typename Dist::value_type& adder, const policies::discrete_quantile&, - boost::uintmax_t& max_iter) + std::uintmax_t& max_iter) { BOOST_MATH_STD_USING typename Dist::value_type pp = c ? 1 - p : p; @@ -542,7 +542,7 @@ inline typename Dist::value_type const typename Dist::value_type& multiplier, const typename Dist::value_type& adder, const policies::discrete_quantile&, - boost::uintmax_t& max_iter) + std::uintmax_t& max_iter) { typedef typename Dist::value_type value_type; BOOST_MATH_STD_USING diff --git a/include/boost/math/distributions/inverse_gaussian.hpp b/include/boost/math/distributions/inverse_gaussian.hpp index e3aa4e065..e614ad981 100644 --- a/include/boost/math/distributions/inverse_gaussian.hpp +++ b/include/boost/math/distributions/inverse_gaussian.hpp @@ -355,7 +355,7 @@ inline RealType quantile(const inverse_gaussian_distribution& // digits used to control how accurate to try to make the result. // To allow user to control accuracy versus speed, int get_digits = policies::digits();// get digits from policy, - boost::uintmax_t m = policies::get_max_root_iterations(); // and max iterations. + std::uintmax_t m = policies::get_max_root_iterations(); // and max iterations. using boost::math::tools::newton_raphson_iterate; result = newton_raphson_iterate(inverse_gaussian_quantile_functor(dist, p), guess, min, max, get_digits, m); @@ -440,7 +440,7 @@ inline RealType quantile(const complemented2_type::digits; // Maximum possible binary digits accuracy for type T. // digits used to control how accurate to try to make the result. int get_digits = policies::digits(); - boost::uintmax_t m = policies::get_max_root_iterations(); + std::uintmax_t m = policies::get_max_root_iterations(); using boost::math::tools::newton_raphson_iterate; result = newton_raphson_iterate(inverse_gaussian_quantile_complement_functor(c.dist, q), guess, min, max, get_digits, m); diff --git a/include/boost/math/distributions/kolmogorov_smirnov.hpp b/include/boost/math/distributions/kolmogorov_smirnov.hpp index 1dc0a92cc..9681b8e02 100644 --- a/include/boost/math/distributions/kolmogorov_smirnov.hpp +++ b/include/boost/math/distributions/kolmogorov_smirnov.hpp @@ -374,7 +374,7 @@ inline RealType quantile(const kolmogorov_smirnov_distribution RealType k = detail::kolmogorov_smirnov_quantile_guess(p) / sqrt(n); const int get_digits = policies::digits();// get digits from policy, - boost::uintmax_t m = policies::get_max_root_iterations(); // and max iterations. + std::uintmax_t m = policies::get_max_root_iterations(); // and max iterations. return tools::newton_raphson_iterate(detail::kolmogorov_smirnov_quantile_functor(dist, p), k, RealType(0), boost::math::tools::max_value(), get_digits, m); @@ -398,7 +398,7 @@ inline RealType quantile(const complemented2_type();// get digits from policy, - boost::uintmax_t m = policies::get_max_root_iterations(); // and max iterations. + std::uintmax_t m = policies::get_max_root_iterations(); // and max iterations. return tools::newton_raphson_iterate( detail::kolmogorov_smirnov_complementary_quantile_functor(dist, p), diff --git a/include/boost/math/distributions/negative_binomial.hpp b/include/boost/math/distributions/negative_binomial.hpp index 00cb0e615..5bfa1e309 100644 --- a/include/boost/math/distributions/negative_binomial.hpp +++ b/include/boost/math/distributions/negative_binomial.hpp @@ -487,7 +487,7 @@ namespace boost // // Max iterations permitted: // - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); typedef typename Policy::discrete_quantile_type discrete_type; return detail::inverse_discrete_quantile( dist, @@ -574,7 +574,7 @@ namespace boost // // Max iterations permitted: // - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); typedef typename Policy::discrete_quantile_type discrete_type; return detail::inverse_discrete_quantile( dist, diff --git a/include/boost/math/distributions/non_central_beta.hpp b/include/boost/math/distributions/non_central_beta.hpp index 3c8eb7112..481202e88 100644 --- a/include/boost/math/distributions/non_central_beta.hpp +++ b/include/boost/math/distributions/non_central_beta.hpp @@ -38,7 +38,7 @@ namespace boost // // Variables come first: // - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); T errtol = boost::math::policies::get_epsilon(); T l2 = lam / 2; // @@ -74,7 +74,7 @@ namespace boost // direction for recursion: // T last_term = 0; - boost::uintmax_t count = k; + std::uintmax_t count = k; for(int i = k; i >= 0; --i) { T term = beta * pois; @@ -101,7 +101,7 @@ namespace boost { break; } - if(static_cast(count + i - k) > max_iter) + if(static_cast(count + i - k) > max_iter) { return policies::raise_evaluation_error( "cdf(non_central_beta_distribution<%1%>, %1%)", @@ -119,7 +119,7 @@ namespace boost // // Variables come first: // - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); T errtol = boost::math::policies::get_epsilon(); T l2 = lam / 2; // @@ -168,7 +168,7 @@ namespace boost // of the bulk of the sum: // T last_term = 0; - boost::uintmax_t count = 0; + std::uintmax_t count = 0; for(int i = k + 1; ; ++i) { poisf *= l2 / i; @@ -182,7 +182,7 @@ namespace boost count = i - k; break; } - if(static_cast(i - k) > max_iter) + if(static_cast(i - k) > max_iter) { return policies::raise_evaluation_error( "cdf(non_central_beta_distribution<%1%>, %1%)", @@ -198,7 +198,7 @@ namespace boost { break; } - if(static_cast(count + k - i) > max_iter) + if(static_cast(count + k - i) > max_iter) { return policies::raise_evaluation_error( "cdf(non_central_beta_distribution<%1%>, %1%)", @@ -289,7 +289,7 @@ namespace boost // heuristics. // template - std::pair bracket_and_solve_root_01(F f, const T& guess, T factor, bool rising, Tol tol, boost::uintmax_t& max_iter, const Policy& pol) + std::pair bracket_and_solve_root_01(F f, const T& guess, T factor, bool rising, Tol tol, std::uintmax_t& max_iter, const Policy& pol) { BOOST_MATH_STD_USING static const char* function = "boost::math::tools::bracket_and_solve_root_01<%1%>"; @@ -303,7 +303,7 @@ namespace boost // // Set up invocation count: // - boost::uintmax_t count = max_iter - 1; + std::uintmax_t count = max_iter - 1; if((fa < 0) == (guess < 0 ? !rising : rising)) { @@ -489,7 +489,7 @@ namespace boost detail::nc_beta_quantile_functor f(non_central_beta_distribution(a, b, l), p, comp); tools::eps_tolerance tol(policies::digits()); - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); std::pair ir = bracket_and_solve_root_01( @@ -523,7 +523,7 @@ namespace boost // // Variables come first: // - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); T errtol = boost::math::policies::get_epsilon(); T l2 = lam / 2; // @@ -544,7 +544,7 @@ namespace boost // // Stable backwards recursion first: // - boost::uintmax_t count = k; + std::uintmax_t count = k; for(int i = k; i >= 0; --i) { T term = beta * pois; @@ -568,7 +568,7 @@ namespace boost { break; } - if(static_cast(count + i - k) > max_iter) + if(static_cast(count + i - k) > max_iter) { return policies::raise_evaluation_error( "pdf(non_central_beta_distribution<%1%>, %1%)", @@ -652,7 +652,7 @@ namespace boost const char* function = "boost::math::detail::hypergeometric_2F2<%1%>(%1%,%1%,%1%,%1%,%1%)"; hypergeometric_2F2_sum s(a1, a2, b1, b2, z); - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); #if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x582)) value_type zero = 0; value_type result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, zero); diff --git a/include/boost/math/distributions/non_central_chi_squared.hpp b/include/boost/math/distributions/non_central_chi_squared.hpp index fe469864d..e8c8442d5 100644 --- a/include/boost/math/distributions/non_central_chi_squared.hpp +++ b/include/boost/math/distributions/non_central_chi_squared.hpp @@ -62,7 +62,7 @@ namespace boost T lambda = theta / 2; T del = f / 2; T y = x / 2; - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); T errtol = boost::math::policies::get_epsilon(); T sum = init_sum; // @@ -89,7 +89,7 @@ namespace boost // recurrences: // int i; - for(i = k; static_cast(i-k) < max_iter; ++i) + for(i = k; static_cast(i-k) < max_iter; ++i) { T term = poisf * gamf; sum += term; @@ -100,7 +100,7 @@ namespace boost break; } //Error check: - if(static_cast(i-k) >= max_iter) + if(static_cast(i-k) >= max_iter) return policies::raise_evaluation_error( "cdf(non_central_chi_squared_distribution<%1%>, %1%)", "Series did not converge, closest value was %1%", sum, pol); @@ -157,12 +157,12 @@ namespace boost if(sum == 0) return sum; - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); T errtol = boost::math::policies::get_epsilon(); int i; T lterm(0), term(0); - for(i = 1; static_cast(i) < max_iter; ++i) + for(i = 1; static_cast(i) < max_iter; ++i) { tk = tk * x / (f + 2 * i); uk = uk * lambda / i; @@ -174,7 +174,7 @@ namespace boost break; } //Error check: - if(static_cast(i) >= max_iter) + if(static_cast(i) >= max_iter) return policies::raise_evaluation_error( "cdf(non_central_chi_squared_distribution<%1%>, %1%)", "Series did not converge, closest value was %1%", sum, pol); @@ -202,7 +202,7 @@ namespace boost // Special case: if(y == 0) return 0; - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); T errtol = boost::math::policies::get_epsilon(); T errorf(0), errorb(0); @@ -270,10 +270,10 @@ namespace boost errorf = poiskf * gamkf; sum += errorf; ++i; - }while((fabs(errorf / sum) > errtol) && (static_cast(i) < max_iter)); + }while((fabs(errorf / sum) > errtol) && (static_cast(i) < max_iter)); //Error check: - if(static_cast(i) >= max_iter) + if(static_cast(i) >= max_iter) return policies::raise_evaluation_error( "cdf(non_central_chi_squared_distribution<%1%>, %1%)", "Series did not converge, closest value was %1%", sum, pol); @@ -288,7 +288,7 @@ namespace boost // As above but for the PDF: // BOOST_MATH_STD_USING - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); T errtol = boost::math::policies::get_epsilon(); T x2 = x / 2; T n2 = n / 2; @@ -304,7 +304,7 @@ namespace boost sum += pois; if(pois / sum < errtol) break; - if(static_cast(i - k) >= max_iter) + if(static_cast(i - k) >= max_iter) return policies::raise_evaluation_error( "pdf(non_central_chi_squared_distribution<%1%>, %1%)", "Series did not converge, closest value was %1%", sum, pol); @@ -587,7 +587,7 @@ namespace boost } degrees_of_freedom_finder f(lam, x, p < q ? p : q, p < q ? false : true); tools::eps_tolerance tol(policies::digits()); - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); // // Pick an initial guess that we know will give us a probability // right around 0.5. @@ -643,7 +643,7 @@ namespace boost } non_centrality_finder f(v, x, p < q ? p : q, p < q ? false : true); tools::eps_tolerance tol(policies::digits()); - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); // // Pick an initial guess that we know will give us a probability // right around 0.5. diff --git a/include/boost/math/distributions/non_central_t.hpp b/include/boost/math/distributions/non_central_t.hpp index 5a8514cfd..5c74c5e6c 100644 --- a/include/boost/math/distributions/non_central_t.hpp +++ b/include/boost/math/distributions/non_central_t.hpp @@ -33,7 +33,7 @@ namespace boost // // Variables come first: // - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); T errtol = policies::get_epsilon(); T d2 = delta * delta / 2; // @@ -67,7 +67,7 @@ namespace boost // Backwards recursion first, this is the stable // direction for recursion: // - boost::uintmax_t count = 0; + std::uintmax_t count = 0; T last_term = 0; for(int i = k; i >= 0; --i) { @@ -111,7 +111,7 @@ namespace boost // // Variables come first: // - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); T errtol = boost::math::policies::get_epsilon(); T d2 = delta * delta / 2; // @@ -169,7 +169,7 @@ namespace boost // // Fused forward and backwards recursion: // - boost::uintmax_t count = 0; + std::uintmax_t count = 0; T last_term = 0; for(int i = k + 1, j = k; ; ++i, --j) { @@ -379,7 +379,7 @@ namespace boost // // Variables come first: // - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); T errtol = boost::math::policies::get_epsilon(); T d2 = delta * delta / 2; // @@ -407,7 +407,7 @@ namespace boost // Backwards recursion first, this is the stable // direction for recursion: // - boost::uintmax_t count = 0; + std::uintmax_t count = 0; for(int i = k; i >= 0; --i) { T term = xterm * pois; @@ -637,7 +637,7 @@ namespace boost } t_degrees_of_freedom_finder f(delta, x, p < q ? p : q, p < q ? false : true); tools::eps_tolerance tol(policies::digits()); - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); // // Pick an initial guess: // @@ -690,7 +690,7 @@ namespace boost } t_non_centrality_finder f(v, x, p < q ? p : q, p < q ? false : true); tools::eps_tolerance tol(policies::digits()); - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); // // Pick an initial guess that we know is the right side of // zero: diff --git a/include/boost/math/distributions/poisson.hpp b/include/boost/math/distributions/poisson.hpp index 013bc9537..b2a1651ef 100644 --- a/include/boost/math/distributions/poisson.hpp +++ b/include/boost/math/distributions/poisson.hpp @@ -410,7 +410,7 @@ namespace boost return policies::raise_overflow_error(function, 0, Policy()); } typedef typename Policy::discrete_quantile_type discrete_type; - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); RealType guess, factor = 8; RealType z = dist.mean(); if(z < 1) @@ -480,7 +480,7 @@ namespace boost return 0; // Exact result regardless of discrete-quantile Policy } typedef typename Policy::discrete_quantile_type discrete_type; - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); RealType guess, factor = 8; RealType z = dist.mean(); if(z < 1) diff --git a/include/boost/math/distributions/skew_normal.hpp b/include/boost/math/distributions/skew_normal.hpp index 39e9cee7f..62853f62c 100644 --- a/include/boost/math/distributions/skew_normal.hpp +++ b/include/boost/math/distributions/skew_normal.hpp @@ -552,7 +552,7 @@ namespace boost{ namespace math{ } const int get_digits = policies::digits();// get digits from policy, - boost::uintmax_t m = policies::get_max_root_iterations(); // and max iterations. + std::uintmax_t m = policies::get_max_root_iterations(); // and max iterations. skew_normal_distribution helper(0, 1, shape); @@ -671,7 +671,7 @@ namespace boost{ namespace math{ const RealType search_max = range(dist).second; const int get_digits = policies::digits();// get digits from policy, - boost::uintmax_t m = policies::get_max_root_iterations(); // and max iterations. + std::uintmax_t m = policies::get_max_root_iterations(); // and max iterations. result = tools::newton_raphson_iterate(detail::skew_normal_quantile_functor(dist, p), result, search_min, search_max, get_digits, m); diff --git a/include/boost/math/distributions/students_t.hpp b/include/boost/math/distributions/students_t.hpp index 4f41f8827..c8d9f8bcf 100644 --- a/include/boost/math/distributions/students_t.hpp +++ b/include/boost/math/distributions/students_t.hpp @@ -325,7 +325,7 @@ RealType students_t_distribution::find_degrees_of_freedom( detail::sample_size_func f(alpha, beta, sd, difference_from_mean); tools::eps_tolerance tol(policies::digits()); - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); std::pair r = tools::bracket_and_solve_root(f, hint, RealType(2), false, tol, max_iter, Policy()); RealType result = r.first + (r.second - r.first) / 2; if(max_iter >= policies::get_max_root_iterations()) diff --git a/include/boost/math/special_functions/airy.hpp b/include/boost/math/special_functions/airy.hpp index b022c0c43..d7da0035d 100644 --- a/include/boost/math/special_functions/airy.hpp +++ b/include/boost/math/special_functions/airy.hpp @@ -181,9 +181,9 @@ T airy_ai_zero_imp(int m, const Policy& pol) // of decimal digits in the numeric type T, being at least 12. const int my_digits10 = static_cast(static_cast(policies::digits() * 0.301F)); - const boost::uintmax_t iterations_allowed = static_cast((std::max)(12, my_digits10 * 2)); + const std::uintmax_t iterations_allowed = static_cast((std::max)(12, my_digits10 * 2)); - boost::uintmax_t iterations_used = iterations_allowed; + std::uintmax_t iterations_used = iterations_allowed; // Use a dynamic tolerance because the roots get closer the higher m gets. T tolerance; @@ -233,9 +233,9 @@ T airy_bi_zero_imp(int m, const Policy& pol) // of decimal digits in the numeric type T, being at least 12. const int my_digits10 = static_cast(static_cast(policies::digits() * 0.301F)); - const boost::uintmax_t iterations_allowed = static_cast((std::max)(12, my_digits10 * 2)); + const std::uintmax_t iterations_allowed = static_cast((std::max)(12, my_digits10 * 2)); - boost::uintmax_t iterations_used = iterations_allowed; + std::uintmax_t iterations_used = iterations_allowed; // Use a dynamic tolerance because the roots get closer the higher m gets. T tolerance; diff --git a/include/boost/math/special_functions/bessel.hpp b/include/boost/math/special_functions/bessel.hpp index 5896f5c95..1e91e5df5 100644 --- a/include/boost/math/special_functions/bessel.hpp +++ b/include/boost/math/special_functions/bessel.hpp @@ -78,7 +78,7 @@ inline T sph_bessel_j_small_z_series(unsigned v, T x, const Policy& pol) { BOOST_MATH_STD_USING // ADL of std names sph_bessel_j_small_z_series_term s(v, x); - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); #if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x582)) T zero = 0; T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, zero); @@ -399,7 +399,7 @@ inline T cyl_bessel_j_zero_imp(T v, int m, const Policy& pol) const T guess_root = boost::math::detail::bessel_zero::cyl_bessel_j_zero_detail::initial_guess((order_is_integer ? vv : v), m, pol); // Select the maximum allowed iterations from the policy. - boost::uintmax_t number_of_iterations = policies::get_max_root_iterations(); + std::uintmax_t number_of_iterations = policies::get_max_root_iterations(); const T delta_lo = ((guess_root > 0.2F) ? T(0.2) : T(guess_root / 2U)); @@ -478,7 +478,7 @@ inline T cyl_neumann_zero_imp(T v, int m, const Policy& pol) const T guess_root = boost::math::detail::bessel_zero::cyl_neumann_zero_detail::initial_guess(v, m, pol); // Select the maximum allowed iterations from the policy. - boost::uintmax_t number_of_iterations = policies::get_max_root_iterations(); + std::uintmax_t number_of_iterations = policies::get_max_root_iterations(); const T delta_lo = ((guess_root > 0.2F) ? T(0.2) : T(guess_root / 2U)); diff --git a/include/boost/math/special_functions/beta.hpp b/include/boost/math/special_functions/beta.hpp index be2339f3a..cebb83476 100644 --- a/include/boost/math/special_functions/beta.hpp +++ b/include/boost/math/special_functions/beta.hpp @@ -603,7 +603,7 @@ T ibeta_series(T a, T b, T x, T s0, const Lanczos&, bool normalised, T* p_deriva if(result < tools::min_value()) return s0; // Safeguard: series can't cope with denorms. ibeta_series_t s(a, b, x, result); - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, s0); policies::check_series_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%) in ibeta_series (with lanczos)", max_iter, pol); return result; @@ -664,7 +664,7 @@ T ibeta_series(T a, T b, T x, T s0, const boost::math::lanczos::undefined_lanczo if(result < tools::min_value()) return s0; // Safeguard: series can't cope with denorms. ibeta_series_t s(a, b, x, result); - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, s0); policies::check_series_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%) in ibeta_series (without lanczos)", max_iter, pol); return result; diff --git a/include/boost/math/special_functions/detail/bernoulli_details.hpp b/include/boost/math/special_functions/detail/bernoulli_details.hpp index 94178dbe7..295f6f3cc 100644 --- a/include/boost/math/special_functions/detail/bernoulli_details.hpp +++ b/include/boost/math/special_functions/detail/bernoulli_details.hpp @@ -101,7 +101,7 @@ inline std::size_t find_bernoulli_overflow_limit(const std::false_type&) ulong_long_type t = lltrunc(boost::math::tools::log_max_value()); max_bernoulli_root_functor fun(t); boost::math::tools::equal_floor tol; - boost::uintmax_t max_iter = boost::math::policies::get_max_root_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_root_iterations(); double result = boost::math::tools::toms748_solve(fun, sqrt(double(t)), double(t), tol, max_iter).first / 2; if (result > max_result) result = max_result; diff --git a/include/boost/math/special_functions/detail/bessel_ik.hpp b/include/boost/math/special_functions/detail/bessel_ik.hpp index babb09e6a..b7b8a9452 100644 --- a/include/boost/math/special_functions/detail/bessel_ik.hpp +++ b/include/boost/math/special_functions/detail/bessel_ik.hpp @@ -67,7 +67,7 @@ inline T bessel_i_small_z_series(T v, T x, const Policy& pol) return prefix; cyl_bessel_i_small_z s(v, x); - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); #if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x582)) T zero = 0; T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, zero); diff --git a/include/boost/math/special_functions/detail/bessel_jy_derivatives_series.hpp b/include/boost/math/special_functions/detail/bessel_jy_derivatives_series.hpp index 098e04685..90cd64cf2 100644 --- a/include/boost/math/special_functions/detail/bessel_jy_derivatives_series.hpp +++ b/include/boost/math/special_functions/detail/bessel_jy_derivatives_series.hpp @@ -66,7 +66,7 @@ inline T bessel_j_derivative_small_z_series(T v, T x, const Policy& pol) return prefix; bessel_j_derivative_small_z_series_term s(v, x); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); #if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x582)) T zero = 0; T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, zero); @@ -180,7 +180,7 @@ inline T bessel_y_derivative_small_z_series(T v, T x, const Policy& pol) prefix = -exp(prefix); } bessel_y_derivative_small_z_series_term_a s(v, x); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); #if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x582)) T zero = 0; T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, zero); diff --git a/include/boost/math/special_functions/detail/bessel_jy_series.hpp b/include/boost/math/special_functions/detail/bessel_jy_series.hpp index a7ea09dd6..20b9f3669 100644 --- a/include/boost/math/special_functions/detail/bessel_jy_series.hpp +++ b/include/boost/math/special_functions/detail/bessel_jy_series.hpp @@ -61,7 +61,7 @@ inline T bessel_j_small_z_series(T v, T x, const Policy& pol) return prefix; bessel_j_small_z_series_term s(v, x); - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); #if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x582)) T zero = 0; T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, zero); @@ -177,7 +177,7 @@ inline T bessel_y_small_z_series(T v, T x, T* pscale, const Policy& pol) prefix = -exp(prefix); } bessel_y_small_z_series_term_a s(v, x); - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); *pscale = scale; #if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x582)) T zero = 0; diff --git a/include/boost/math/special_functions/detail/bessel_jy_zero.hpp b/include/boost/math/special_functions/detail/bessel_jy_zero.hpp index 9ab994312..c8ab4cf0d 100644 --- a/include/boost/math/special_functions/detail/bessel_jy_zero.hpp +++ b/include/boost/math/special_functions/detail/bessel_jy_zero.hpp @@ -130,9 +130,9 @@ // Select the maximum allowed iterations based on the number // of decimal digits in the numeric type T, being at least 12. - const boost::uintmax_t iterations_allowed = static_cast((std::max)(12, my_digits10 * 2)); + const std::uintmax_t iterations_allowed = static_cast((std::max)(12, my_digits10 * 2)); - boost::uintmax_t iterations_used = iterations_allowed; + std::uintmax_t iterations_used = iterations_allowed; // Calculate the root of z as a function of zeta. const T z = boost::math::tools::newton_raphson_iterate( @@ -319,7 +319,7 @@ } // Perform several steps of bisection iteration to refine the guess. - boost::uintmax_t number_of_iterations(12U); + std::uintmax_t number_of_iterations(12U); // Do the bisection iteration. const boost::math::tuple guess_pair = @@ -550,7 +550,7 @@ } // Perform several steps of bisection iteration to refine the guess. - boost::uintmax_t number_of_iterations(12U); + std::uintmax_t number_of_iterations(12U); // Do the bisection iteration. const boost::math::tuple guess_pair = diff --git a/include/boost/math/special_functions/detail/erf_inv.hpp b/include/boost/math/special_functions/detail/erf_inv.hpp index aebc8a5f9..092067021 100644 --- a/include/boost/math/special_functions/detail/erf_inv.hpp +++ b/include/boost/math/special_functions/detail/erf_inv.hpp @@ -307,7 +307,7 @@ T erf_inv_imp(const T& p, const T& q, const Policy& pol, const std::integral_con // if(policies::digits() > 64) { - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); if(p <= 0.5) { result = tools::halley_iterate(detail::erf_roots::type, Policy>(p, 1), guess, static_cast(0), tools::max_value(), (policies::digits() * 2) / 3, max_iter); diff --git a/include/boost/math/special_functions/detail/hypergeometric_1F1_addition_theorems_on_z.hpp b/include/boost/math/special_functions/detail/hypergeometric_1F1_addition_theorems_on_z.hpp index c70ffa9b7..49f0fc0aa 100644 --- a/include/boost/math/special_functions/detail/hypergeometric_1F1_addition_theorems_on_z.hpp +++ b/include/boost/math/special_functions/detail/hypergeometric_1F1_addition_theorems_on_z.hpp @@ -80,7 +80,7 @@ BOOST_MATH_STD_USING BOOST_MATH_ASSERT((z + k) / z > 0.5f); hypergeometric_1f1_recurrence_on_z_minus_zero_series s(a, b, z, k, pol); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); log_scaling += s.scale(); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1f1_recurrence_on_z_plus_plus<%1%>(%1%,%1%,%1%)", max_iter, pol); @@ -125,7 +125,7 @@ T hypergeometric_1f1_recurrence_on_z_plus_plus(const T& a, const T& b, const T& z, int k, const Policy& pol) { hypergeometric_1f1_recurrence_on_z_plus_plus_series s(a, b, z, k, pol); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1f1_recurrence_on_z_plus_plus<%1%>(%1%,%1%,%1%)", max_iter, pol); return result; @@ -164,7 +164,7 @@ BOOST_MATH_STD_USING BOOST_MATH_ASSERT(abs(k) < fabs(z)); hypergeometric_1f1_recurrence_on_z_zero_minus_series s(a, b, z, k, pol); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1f1_recurrence_on_z_plus_plus<%1%>(%1%,%1%,%1%)", max_iter, pol); return result * pow((z + k) / z, 1 - b); @@ -203,7 +203,7 @@ BOOST_MATH_ASSERT(k / z > -0.5f); //BOOST_MATH_ASSERT(floor(a) != a || a > 0); hypergeometric_1f1_recurrence_on_z_plus_zero_series s(a, b, z, k, pol); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1f1_recurrence_on_z_plus_plus<%1%>(%1%,%1%,%1%)", max_iter, pol); return result * pow(z / (z + k), a); @@ -241,7 +241,7 @@ { BOOST_MATH_STD_USING hypergeometric_1f1_recurrence_on_z_zero_plus_series s(a, b, z, k, pol); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1f1_recurrence_on_z_plus_plus<%1%>(%1%,%1%,%1%)", max_iter, pol); return result * exp(T(k)); @@ -281,7 +281,7 @@ { BOOST_MATH_STD_USING hypergeometric_1f1_recurrence_on_z_minus_minus_series s(a, b, z, k, pol); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1f1_recurrence_on_z_plus_plus<%1%>(%1%,%1%,%1%)", max_iter, pol); return result * exp(T(k)) * pow((z + k) / z, 1 - b); diff --git a/include/boost/math/special_functions/detail/hypergeometric_1F1_bessel.hpp b/include/boost/math/special_functions/detail/hypergeometric_1F1_bessel.hpp index 2536a15e8..181015d5f 100644 --- a/include/boost/math/special_functions/detail/hypergeometric_1F1_bessel.hpp +++ b/include/boost/math/special_functions/detail/hypergeometric_1F1_bessel.hpp @@ -357,7 +357,7 @@ prefix -= scale; } T result(0); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); bool retry = false; long long series_scale = 0; try @@ -448,7 +448,7 @@ { BOOST_MATH_STD_USING cyl_bessel_i_large_x_sum s(v, x); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::cyl_bessel_i_large_x<%1%>(%1%,%1%)", max_iter, pol); long long scale = boost::math::lltrunc(x); @@ -576,7 +576,7 @@ return exp(z - scale); } hypergeometric_1F1_AS_13_3_6_series s(a, b, z, b_minus_a, pol); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1F1_AS_13_3_6<%1%>(%1%,%1%,%1%)", max_iter, pol); result *= boost::math::tgamma(b_minus_a - 0.5f, pol) * pow(z / 4, -b_minus_a + 0.5f); @@ -642,7 +642,7 @@ BOOST_MATH_STD_USING T prefix = exp(h * z) * boost::math::tgamma(b); hypergeometric_1F1_AS_13_3_8_series s(a, b, z, h, pol); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1F1_AS_13_3_8<%1%>(%1%,%1%,%1%)", max_iter, pol); result *= prefix; @@ -712,7 +712,7 @@ } hypergeometric_1f1_13_11_1_series s(a, b, z, pol); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1f1_13_11_1<%1%>(%1%,%1%,%1%)", max_iter, pol); if (use_logs) diff --git a/include/boost/math/special_functions/detail/hypergeometric_1F1_by_ratios.hpp b/include/boost/math/special_functions/detail/hypergeometric_1F1_by_ratios.hpp index 42990bd8d..ce2fe20eb 100644 --- a/include/boost/math/special_functions/detail/hypergeometric_1F1_by_ratios.hpp +++ b/include/boost/math/special_functions/detail/hypergeometric_1F1_by_ratios.hpp @@ -107,7 +107,7 @@ // Let M3 = M(1+a-b + 1, 2-b + 1, z) // we can get to this from the ratio which is cheaper to calculate: // - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); boost::math::detail::hypergeometric_1F1_recurrence_a_and_b_coefficients coef2(1 + a - b + 1, 2 - b + 1, z); T M3 = boost::math::tools::function_ratio_from_backwards_recurrence(coef2, boost::math::policies::get_epsilon(), max_iter) * M2; boost::math::policies::check_series_iterations("boost::math::hypergeometric_1F1_from_function_ratio_negative_b_positive_a<%1%>(%1%,%1%,%1%)", max_iter, pol); @@ -134,7 +134,7 @@ // // Get the function ratio, M(a+1, b+1, z)/M(a,b,z): // - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); boost::math::detail::hypergeometric_1F1_recurrence_a_and_b_coefficients coef(a + 1, b + 1, z); T ratio = boost::math::tools::function_ratio_from_backwards_recurrence(coef, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1F1_from_function_ratio_negative_b_positive_a<%1%>(%1%,%1%,%1%)", max_iter, pol); @@ -576,7 +576,7 @@ // // Get the function ratio, M(a+1, b+1, z)/M(a,b,z): // - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); boost::math::detail::hypergeometric_1F1_recurrence_a_and_b_coefficients coef(a, b, z); T ratio = 1 / boost::math::tools::function_ratio_from_forwards_recurrence(coef, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1F1_from_function_ratio_negative_b_positive_a<%1%>(%1%,%1%,%1%)", max_iter, pol); @@ -625,7 +625,7 @@ // // Get the function ratio, M(a+1, b+1, z)/M(a,b,z): // - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); boost::math::detail::hypergeometric_1F1_recurrence_b_coefficients coef(a, b + 1, z); T ratio = boost::math::tools::function_ratio_from_backwards_recurrence(coef, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1F1_from_function_ratio_negative_b_positive_a<%1%>(%1%,%1%,%1%)", max_iter, pol); diff --git a/include/boost/math/special_functions/detail/hypergeometric_1F1_cf.hpp b/include/boost/math/special_functions/detail/hypergeometric_1F1_cf.hpp index 572d2d3ba..bc23d5f14 100644 --- a/include/boost/math/special_functions/detail/hypergeometric_1F1_cf.hpp +++ b/include/boost/math/special_functions/detail/hypergeometric_1F1_cf.hpp @@ -39,7 +39,7 @@ T hypergeometric_1F1_cf(const T& a, const T& b, const T& z, const Policy& pol, const char* function) { hypergeometric_1F1_cf_func func(a, b, z); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T result = boost::math::tools::continued_fraction_a(func, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations(function, max_iter, pol); return 1 + a * z / (b * (1 + result)); diff --git a/include/boost/math/special_functions/detail/hypergeometric_1F1_large_abz.hpp b/include/boost/math/special_functions/detail/hypergeometric_1F1_large_abz.hpp index 4426d3ff7..7823e33cb 100644 --- a/include/boost/math/special_functions/detail/hypergeometric_1F1_large_abz.hpp +++ b/include/boost/math/special_functions/detail/hypergeometric_1F1_large_abz.hpp @@ -82,7 +82,7 @@ } hypergeometric_1F1_igamma_series s(b_minus_a, a - 1, x, pol); log_scaling += s.log_scaling; - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::tgamma<%1%>(%1%,%1%)", max_iter, pol); T log_prefix = x + boost::math::lgamma(b, pol) - boost::math::lgamma(a, pol); @@ -124,7 +124,7 @@ crossover_shift = a_shift; crossover_a = a_local + crossover_shift; boost::math::detail::hypergeometric_1F1_recurrence_b_coefficients b_coef(crossover_a, b_local, x); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T b_ratio = boost::math::tools::function_ratio_from_backwards_recurrence(b_coef, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1F1_large_abz<%1%>(%1%,%1%,%1%)", max_iter, pol); // @@ -169,7 +169,7 @@ // Regular case where forwards iteration is stable right from the start: // boost::math::detail::hypergeometric_1F1_recurrence_b_coefficients b_coef(a_local, b_local, x); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T b_ratio = boost::math::tools::function_ratio_from_backwards_recurrence(b_coef, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1F1_large_abz<%1%>(%1%,%1%,%1%)", max_iter, pol); // @@ -197,7 +197,7 @@ // BOOST_MATH_ASSERT(2 * a - b_local + x > 0); boost::math::detail::hypergeometric_1F1_recurrence_b_coefficients b_coef(a, b_local, x); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T b_ratio = boost::math::tools::function_ratio_from_backwards_recurrence(b_coef, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1F1_large_abz<%1%>(%1%,%1%,%1%)", max_iter, pol); // @@ -244,7 +244,7 @@ // so grab the ratio and work backwards to b - b_shift and normalise. // boost::math::detail::hypergeometric_1F1_recurrence_b_coefficients b_coef(a, b, x); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T first = 1; // arbitrary value; T second = 1 / boost::math::tools::function_ratio_from_backwards_recurrence(b_coef, boost::math::policies::get_epsilon(), max_iter); @@ -283,7 +283,7 @@ { BOOST_MATH_ASSERT(!is_negative_integer(b - a)); boost::math::detail::hypergeometric_1F1_recurrence_b_coefficients b_coef(a, b_local, x); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); second = h / boost::math::tools::function_ratio_from_backwards_recurrence(b_coef, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1F1_large_abz<%1%>(%1%,%1%,%1%)", max_iter, pol); } diff --git a/include/boost/math/special_functions/detail/hypergeometric_1F1_recurrence.hpp b/include/boost/math/special_functions/detail/hypergeometric_1F1_recurrence.hpp index a4d8195cb..aee1fcb2b 100644 --- a/include/boost/math/special_functions/detail/hypergeometric_1F1_recurrence.hpp +++ b/include/boost/math/special_functions/detail/hypergeometric_1F1_recurrence.hpp @@ -36,7 +36,7 @@ { } - result_type operator()(boost::intmax_t i) const + result_type operator()(std::intmax_t i) const { const T ai = a + i; @@ -62,7 +62,7 @@ { } - result_type operator()(boost::intmax_t i) const + result_type operator()(std::intmax_t i) const { const T bi = b + i; @@ -90,7 +90,7 @@ { } - result_type operator()(boost::intmax_t i) const + result_type operator()(std::intmax_t i) const { const T bi = b + (i + N); const T bi_minus_1 = b + (i + N - 1); @@ -118,7 +118,7 @@ { } - result_type operator()(boost::intmax_t i) const + result_type operator()(std::intmax_t i) const { const T ai = a + (offset + i); const T bi = b + (offset + i); @@ -153,7 +153,7 @@ { } - result_type operator()(boost::intmax_t i) const + result_type operator()(std::intmax_t i) const { i *= 2; const T ai = a + (offset + i); @@ -188,7 +188,7 @@ { } - result_type operator()(boost::intmax_t i) const + result_type operator()(std::intmax_t i) const { i *= 2; const T ai = a + (offset + i); @@ -220,7 +220,7 @@ { } - result_type operator()(boost::intmax_t i) const + result_type operator()(std::intmax_t i) const { i *= 2; const T bi = b + (offset + i); @@ -257,7 +257,7 @@ { } - result_type operator()(boost::intmax_t i) const + result_type operator()(std::intmax_t i) const { const T ai = a + (offset + i); const T bi = b - (offset + i); @@ -281,7 +281,7 @@ { BOOST_MATH_STD_USING // modf, frexp, fabs, pow - boost::intmax_t integer_part = 0; + std::intmax_t integer_part = 0; T ak = modf(a, &integer_part); // // We need ak-1 positive to avoid infinite recursion below: @@ -292,7 +292,7 @@ integer_part -= 2; } - if (-integer_part > static_cast(policies::get_max_series_iterations())) + if (-integer_part > static_cast(policies::get_max_series_iterations())) return policies::raise_evaluation_error(function, "1F1 arguments sit in a range with a so negative that we have no evaluation method, got a = %1%", std::numeric_limits::quiet_NaN(), pol); T first, second; @@ -364,10 +364,10 @@ // If the shifts are so large that we would throw an evaluation_error, try the series instead, // even though this will almost certainly throw as well: // - if (b_shift > static_cast(boost::math::policies::get_max_series_iterations())) + if (b_shift > static_cast(boost::math::policies::get_max_series_iterations())) return hypergeometric_1F1_checked_series_impl(a, b, z, pol, log_scaling); - if (a_shift > static_cast(boost::math::policies::get_max_series_iterations())) + if (a_shift > static_cast(boost::math::policies::get_max_series_iterations())) return hypergeometric_1F1_checked_series_impl(a, b, z, pol, log_scaling); int a_b_shift = b < 0 ? itrunc(b + b_shift) : b_shift; // The max we can shift on a and b together diff --git a/include/boost/math/special_functions/detail/hypergeometric_1F1_small_a_negative_b_by_ratio.hpp b/include/boost/math/special_functions/detail/hypergeometric_1F1_small_a_negative_b_by_ratio.hpp index d28acbbf1..4414a75d8 100644 --- a/include/boost/math/special_functions/detail/hypergeometric_1F1_small_a_negative_b_by_ratio.hpp +++ b/include/boost/math/special_functions/detail/hypergeometric_1F1_small_a_negative_b_by_ratio.hpp @@ -47,7 +47,7 @@ // then recurse until b > 0, compute a reference value and normalize (Millers method). // int iterations = itrunc(-b, pol); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T ratio = boost::math::tools::function_ratio_from_forwards_recurrence(boost::math::detail::hypergeometric_1F1_recurrence_b_coefficients(a, b, z), boost::math::tools::epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::hypergeometric_1F1_small_a_negative_b_by_ratio<%1%>(%1%,%1%,%1%)", max_iter, pol); T first = 1; diff --git a/include/boost/math/special_functions/detail/hypergeometric_cf.hpp b/include/boost/math/special_functions/detail/hypergeometric_cf.hpp index 64dfd75b5..236cc551a 100644 --- a/include/boost/math/special_functions/detail/hypergeometric_cf.hpp +++ b/include/boost/math/special_functions/detail/hypergeometric_cf.hpp @@ -166,7 +166,7 @@ inline T compute_cf_pFq(detail::hypergeometric_pFq_cf_term& term, const Policy& pol) { BOOST_MATH_STD_USING - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); const T result = tools::continued_fraction_b( term, boost::math::policies::get_epsilon(), diff --git a/include/boost/math/special_functions/detail/hypergeometric_separated_series.hpp b/include/boost/math/special_functions/detail/hypergeometric_separated_series.hpp index 19662bcea..3baff69f4 100644 --- a/include/boost/math/special_functions/detail/hypergeometric_separated_series.hpp +++ b/include/boost/math/special_functions/detail/hypergeometric_separated_series.hpp @@ -17,7 +17,7 @@ { BOOST_MATH_STD_USING - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); const T factor = policies::get_epsilon(); T denom = 1, numer = 1; diff --git a/include/boost/math/special_functions/detail/hypergeometric_series.hpp b/include/boost/math/special_functions/detail/hypergeometric_series.hpp index af3e951ae..a5c8f573b 100644 --- a/include/boost/math/special_functions/detail/hypergeometric_series.hpp +++ b/include/boost/math/special_functions/detail/hypergeometric_series.hpp @@ -184,7 +184,7 @@ inline T sum_pFq_series(detail::hypergeometric_pFq_generic_series_term& term, const Policy& pol) { BOOST_MATH_STD_USING - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); #if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x582)) const T zero = 0; const T result = boost::math::tools::sum_series(term, boost::math::policies::get_epsilon(), max_iter, zero); diff --git a/include/boost/math/special_functions/detail/ibeta_inverse.hpp b/include/boost/math/special_functions/detail/ibeta_inverse.hpp index 6de7af8dd..e3dc0ba4f 100644 --- a/include/boost/math/special_functions/detail/ibeta_inverse.hpp +++ b/include/boost/math/special_functions/detail/ibeta_inverse.hpp @@ -872,7 +872,7 @@ T ibeta_inv_imp(T a, T b, T p, T q, const Policy& pol, T* py) // Now iterate, we can use either p or q as the target here // depending on which is smaller: // - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); x = boost::math::tools::halley_iterate( boost::math::detail::ibeta_roots(a, b, (p < q ? p : q), (p < q ? false : true)), x, lower, upper, digits, max_iter); policies::check_root_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%)", max_iter, pol); diff --git a/include/boost/math/special_functions/detail/igamma_inverse.hpp b/include/boost/math/special_functions/detail/igamma_inverse.hpp index 41ce93d4e..caea159c5 100644 --- a/include/boost/math/special_functions/detail/igamma_inverse.hpp +++ b/include/boost/math/special_functions/detail/igamma_inverse.hpp @@ -433,7 +433,7 @@ T gamma_p_inv_imp(T a, T p, const Policy& pol) // // Go ahead and iterate: // - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); guess = tools::halley_iterate( detail::gamma_p_inverse_func(a, p, false), guess, @@ -492,7 +492,7 @@ T gamma_q_inv_imp(T a, T q, const Policy& pol) // // Go ahead and iterate: // - boost::uintmax_t max_iter = policies::get_max_root_iterations(); + std::uintmax_t max_iter = policies::get_max_root_iterations(); guess = tools::halley_iterate( detail::gamma_p_inverse_func(a, q, true), guess, diff --git a/include/boost/math/special_functions/digamma.hpp b/include/boost/math/special_functions/digamma.hpp index 441dceb33..e0323f533 100644 --- a/include/boost/math/special_functions/digamma.hpp +++ b/include/boost/math/special_functions/digamma.hpp @@ -182,7 +182,7 @@ inline T digamma_imp_large(T x, const Policy& pol, const std::integral_constant< BOOST_MATH_STD_USING digamma_series_func s(x); T result = log(x) - 1 / (2 * x); - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, -result); result = -result; policies::check_series_iterations("boost::math::digamma<%1%>(%1%)", max_iter, pol); diff --git a/include/boost/math/special_functions/erf.hpp b/include/boost/math/special_functions/erf.hpp index 6f9f9bfa4..1f1071fc4 100644 --- a/include/boost/math/special_functions/erf.hpp +++ b/include/boost/math/special_functions/erf.hpp @@ -130,7 +130,7 @@ T erf_series_near_zero_sum(const T& x, const Policy& pol) // This method is *much* faster than the alternatives even so. // erf_series_near_zero sum(x); - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); T result = constants::two_div_root_pi() * tools::kahan_sum_series(sum, tools::digits(), max_iter); policies::check_series_iterations("boost::math::erf<%1%>(%1%, %1%)", max_iter, pol); return result; @@ -156,7 +156,7 @@ T erf_imp(T z, bool invert, const Policy& pol, const Tag& t) if(!invert && (z > detail::erf_asymptotic_limit())) { detail::erf_asympt_series_t s(z); - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); result = boost::math::tools::sum_series(s, policies::get_epsilon(), max_iter, 1); policies::check_series_iterations("boost::math::erf<%1%>(%1%, %1%)", max_iter, pol); } diff --git a/include/boost/math/special_functions/expint.hpp b/include/boost/math/special_functions/expint.hpp index a75cc89ff..f4211e856 100644 --- a/include/boost/math/special_functions/expint.hpp +++ b/include/boost/math/special_functions/expint.hpp @@ -374,7 +374,7 @@ inline T expint_as_fraction(unsigned n, T z, const Policy& pol) { BOOST_MATH_STD_USING BOOST_MATH_INSTRUMENT_VARIABLE(z) - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); expint_fraction f(n, z); T result = tools::continued_fraction_b( f, @@ -413,7 +413,7 @@ template inline T expint_as_series(unsigned n, T z, const Policy& pol) { BOOST_MATH_STD_USING - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); BOOST_MATH_INSTRUMENT_VARIABLE(z) @@ -507,7 +507,7 @@ T expint_i_as_series(T z, const Policy& pol) T result = log(z); // (log(z) - log(1 / z)) / 2; result += constants::euler(); expint_i_series s(z); - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); result = tools::sum_series(s, policies::get_epsilon(), max_iter, result); policies::check_series_iterations("boost::math::expint_i_series<%1%>(%1%)", max_iter, pol); return result; diff --git a/include/boost/math/special_functions/gamma.hpp b/include/boost/math/special_functions/gamma.hpp index 98c775fbb..c00b96630 100644 --- a/include/boost/math/special_functions/gamma.hpp +++ b/include/boost/math/special_functions/gamma.hpp @@ -338,7 +338,7 @@ inline T lower_gamma_series(T a, T z, const Policy& pol, T init_value = 0) // lower incomplete integral. Then divide by tgamma(a) // to get the normalised value. lower_incomplete_gamma_series s(a, z); - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); T factor = policies::get_epsilon(); T result = boost::math::tools::sum_series(s, factor, max_iter, init_value); policies::check_series_iterations("boost::math::detail::lower_gamma_series<%1%>(%1%)", max_iter, pol); @@ -1028,7 +1028,7 @@ inline T tgamma_small_upper_part(T a, T x, const Policy& pol, T* pgam = 0, bool result -= p; result /= a; detail::small_gamma2_series s(a, x); - boost::uintmax_t max_iter = policies::get_max_series_iterations() - 10; + std::uintmax_t max_iter = policies::get_max_series_iterations() - 10; p += 1; if(pderivative) *pderivative = p / (*pgam * exp(x)); @@ -1128,7 +1128,7 @@ T incomplete_tgamma_large_x(const T& a, const T& x, const Policy& pol) { BOOST_MATH_STD_USING incomplete_tgamma_large_x_series s(a, x); - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); boost::math::policies::check_series_iterations("boost::math::tgamma<%1%>(%1%,%1%)", max_iter, pol); return result; diff --git a/include/boost/math/special_functions/hypergeometric_0F1.hpp b/include/boost/math/special_functions/hypergeometric_0F1.hpp index 749eb128e..5f0dedd11 100644 --- a/include/boost/math/special_functions/hypergeometric_0F1.hpp +++ b/include/boost/math/special_functions/hypergeometric_0F1.hpp @@ -46,7 +46,7 @@ namespace boost { namespace math { namespace detail { T hypergeometric_0F1_cf_imp(T b, T z, const Policy& pol, const char* function) { hypergeometric_0F1_cf evaluator(b, z); - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); T cf = tools::continued_fraction_b(evaluator, policies::get_epsilon(), max_iter); policies::check_series_iterations(function, max_iter, pol); return cf; diff --git a/include/boost/math/special_functions/hypergeometric_2F0.hpp b/include/boost/math/special_functions/hypergeometric_2F0.hpp index 2eff8e2d5..e42310330 100644 --- a/include/boost/math/special_functions/hypergeometric_2F0.hpp +++ b/include/boost/math/special_functions/hypergeometric_2F0.hpp @@ -48,7 +48,7 @@ namespace boost { namespace math { namespace detail { { using namespace boost::math; hypergeometric_2F0_cf evaluator(a1, a2, z); - boost::uintmax_t max_iter = policies::get_max_series_iterations(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); T cf = tools::continued_fraction_b(evaluator, policies::get_epsilon(), max_iter); policies::check_series_iterations(function, max_iter, pol); return cf; @@ -92,7 +92,7 @@ namespace boost { namespace math { namespace detail { if ((a1 == a2 - 0.5f) && (z < 0)) { // http://functions.wolfram.com/07.31.03.0083.01 - int n = static_cast(static_cast(boost::math::lltrunc(-2 * a1))); + int n = static_cast(static_cast(boost::math::lltrunc(-2 * a1))); T smz = sqrt(-z); return pow(2 / smz, -n) * boost::math::hermite(n, 1 / smz, pol); } @@ -101,8 +101,8 @@ namespace boost { namespace math { namespace detail { { if ((a1 < 1) && (a2 <= a1)) { - const unsigned int n = static_cast(static_cast(boost::math::lltrunc(-a1))); - const unsigned int m = static_cast(static_cast(boost::math::lltrunc(-a2 - n))); + const unsigned int n = static_cast(static_cast(boost::math::lltrunc(-a1))); + const unsigned int m = static_cast(static_cast(boost::math::lltrunc(-a2 - n))); return (pow(z, T(n)) * boost::math::factorial(n, pol)) * boost::math::laguerre(n, m, -(1 / z), pol); @@ -110,8 +110,8 @@ namespace boost { namespace math { namespace detail { else if ((a2 < 1) && (a1 <= a2)) { // function is symmetric for a1 and a2 - const unsigned int n = static_cast(static_cast(boost::math::lltrunc(-a2))); - const unsigned int m = static_cast(static_cast(boost::math::lltrunc(-a1 - n))); + const unsigned int n = static_cast(static_cast(boost::math::lltrunc(-a2))); + const unsigned int m = static_cast(static_cast(boost::math::lltrunc(-a1 - n))); return (pow(z, T(n)) * boost::math::factorial(n, pol)) * boost::math::laguerre(n, m, -(1 / z), pol); diff --git a/include/boost/math/special_functions/hypergeometric_pFq.hpp b/include/boost/math/special_functions/hypergeometric_pFq.hpp index 520765eca..ac9625307 100644 --- a/include/boost/math/special_functions/hypergeometric_pFq.hpp +++ b/include/boost/math/special_functions/hypergeometric_pFq.hpp @@ -30,9 +30,9 @@ namespace boost { struct timed_iteration_terminator { - timed_iteration_terminator(boost::uintmax_t i, double t) : max_iter(i), max_time(t), start_time(std::chrono::system_clock::now()) {} + timed_iteration_terminator(std::uintmax_t i, double t) : max_iter(i), max_time(t), start_time(std::chrono::system_clock::now()) {} - bool operator()(boost::uintmax_t iter)const + bool operator()(std::uintmax_t iter)const { if (iter > max_iter) boost::throw_exception(boost::math::detail::pFq_termination_exception("pFq exceeded maximum permitted iterations.")); @@ -41,7 +41,7 @@ namespace boost { return false; } - boost::uintmax_t max_iter; + std::uintmax_t max_iter; double max_time; std::chrono::system_clock::time_point start_time; }; diff --git a/include/boost/math/special_functions/legendre.hpp b/include/boost/math/special_functions/legendre.hpp index 4d5954537..791d6892c 100644 --- a/include/boost/math/special_functions/legendre.hpp +++ b/include/boost/math/special_functions/legendre.hpp @@ -198,7 +198,7 @@ std::vector legendre_p_zeros_imp(int n, const Policy& pol) T sin_nk = sin(theta_nk); T x_nk_guess = (1 - inv_n_sq/static_cast(8) + inv_n_sq /static_cast(8*n) - (inv_n_sq*inv_n_sq/384)*(39 - 28 / (sin_nk*sin_nk) ) )*cos_nk; - boost::uintmax_t number_of_iterations = policies::get_max_root_iterations(); + std::uintmax_t number_of_iterations = policies::get_max_root_iterations(); legendre_p_zero_func f(n, pol); diff --git a/include/boost/math/special_functions/legendre_stieltjes.hpp b/include/boost/math/special_functions/legendre_stieltjes.hpp index e05a12c2e..69f724264 100644 --- a/include/boost/math/special_functions/legendre_stieltjes.hpp +++ b/include/boost/math/special_functions/legendre_stieltjes.hpp @@ -206,7 +206,7 @@ public: auto p = boost::math::tools::bisect(g, lower_bound, upper_bound, tol); Real x_nk_guess = p.first + (p.second - p.first)*half(); - boost::uintmax_t number_of_iterations = 500; + std::uintmax_t number_of_iterations = 500; auto f = [&] (Real x) { Real Pn = this->operator()(x); Real Pn_prime = this->prime(x); diff --git a/include/boost/math/special_functions/next.hpp b/include/boost/math/special_functions/next.hpp index 32f7988dc..238766cfc 100644 --- a/include/boost/math/special_functions/next.hpp +++ b/include/boost/math/special_functions/next.hpp @@ -75,7 +75,7 @@ inline T normalize_value(const T& val, const std::true_type&) static_assert(std::numeric_limits::is_specialized, "Type T must be specialized."); static_assert(std::numeric_limits::radix != 2, "Type T must be specialized."); - boost::intmax_t shift = (boost::intmax_t)std::numeric_limits::digits - (boost::intmax_t)ilogb(val) - 1; + std::intmax_t shift = (std::intmax_t)std::numeric_limits::digits - (std::intmax_t)ilogb(val) - 1; T result = scalbn(val, shift); result = round(result); return scalbn(result, -shift); @@ -613,7 +613,7 @@ T float_distance_imp(const T& a, const T& b, const std::false_type&, const Polic BOOST_MATH_ASSERT(a >= 0); BOOST_MATH_ASSERT(b >= a); - boost::intmax_t expon; + std::intmax_t expon; // // Note that if a is a denorm then the usual formula fails // because we actually have fewer than tools::digits() @@ -628,7 +628,7 @@ T float_distance_imp(const T& a, const T& b, const std::false_type&, const Polic // if(b > upper) { - boost::intmax_t expon2 = 1 + ilogb(b); + std::intmax_t expon2 = 1 + ilogb(b); T upper2 = scalbn(T(1), expon2 - 1); result = float_distance(upper2, b); result += (expon2 - expon - 1) * scalbn(T(1), std::numeric_limits::digits - 1); @@ -848,7 +848,7 @@ T float_advance_imp(T val, int distance, const std::false_type&, const Policy& p return val; } - boost::intmax_t expon = 1 + ilogb(val); + std::intmax_t expon = 1 + ilogb(val); T limit = scalbn(T(1), distance < 0 ? expon - 1 : expon); if(val <= tools::min_value()) { diff --git a/include/boost/math/special_functions/zeta.hpp b/include/boost/math/special_functions/zeta.hpp index b54491f12..23aa9af85 100644 --- a/include/boost/math/special_functions/zeta.hpp +++ b/include/boost/math/special_functions/zeta.hpp @@ -129,7 +129,7 @@ private: template inline T zeta_series2_imp(T s, const Policy& pol) { - boost::uintmax_t max_iter = policies::get_max_series_iterations();; + std::uintmax_t max_iter = policies::get_max_series_iterations();; zeta_series2 f(s); T result = tools::sum_series( f, diff --git a/include/boost/math/tools/precision.hpp b/include/boost/math/tools/precision.hpp index 7e1d2aef2..9ecb91431 100644 --- a/include/boost/math/tools/precision.hpp +++ b/include/boost/math/tools/precision.hpp @@ -200,7 +200,7 @@ struct log_limit_noexcept_traits : public log_limit_noexcept_traits_imp -inline constexpr T log_max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept_IF(detail::log_limit_noexcept_traits::value) +inline constexpr T log_max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept(detail::log_limit_noexcept_traits::value) { #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS return detail::log_max_value(typename detail::log_limit_traits::tag_type()); @@ -213,7 +213,7 @@ inline constexpr T log_max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept_ } template -inline constexpr T log_min_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept_IF(detail::log_limit_noexcept_traits::value) +inline constexpr T log_min_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept(detail::log_limit_noexcept_traits::value) { #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS return detail::log_min_value(typename detail::log_limit_traits::tag_type()); diff --git a/include/boost/math/tools/recurrence.hpp b/include/boost/math/tools/recurrence.hpp index 0f871775d..1d0bb282f 100644 --- a/include/boost/math/tools/recurrence.hpp +++ b/include/boost/math/tools/recurrence.hpp @@ -94,7 +94,7 @@ namespace boost { // max_iter: Maximum iterations to use solving the continued fraction. // template - T function_ratio_from_backwards_recurrence(const Recurrence& r, const T& factor, boost::uintmax_t& max_iter) + T function_ratio_from_backwards_recurrence(const Recurrence& r, const T& factor, std::uintmax_t& max_iter) { detail::function_ratio_from_backwards_recurrence_fraction f(r); return boost::math::tools::continued_fraction_a(f, factor, max_iter); @@ -115,7 +115,7 @@ namespace boost { // max_iter: Maximum iterations to use solving the continued fraction. // template - T function_ratio_from_forwards_recurrence(const Recurrence& r, const T& factor, boost::uintmax_t& max_iter) + T function_ratio_from_forwards_recurrence(const Recurrence& r, const T& factor, std::uintmax_t& max_iter) { boost::math::tools::detail::function_ratio_from_backwards_recurrence_fraction > f(r); return boost::math::tools::continued_fraction_a(f, factor, max_iter); @@ -242,7 +242,7 @@ namespace boost { forward_recurrence_iterator(const Recurrence& r, value_type f_n) : f_n(f_n), coef(r), k(0) { - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations >(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations >(); f_n_minus_1 = f_n * boost::math::tools::function_ratio_from_forwards_recurrence(detail::recurrence_offsetter(r, -1), value_type(boost::math::tools::epsilon() * 2), max_iter); boost::math::policies::check_series_iterations("forward_recurrence_iterator<>::forward_recurrence_iterator", max_iter, boost::math::policies::policy<>()); } @@ -284,7 +284,7 @@ namespace boost { backward_recurrence_iterator(const Recurrence& r, value_type f_n) : f_n(f_n), coef(r), k(0) { - boost::uintmax_t max_iter = boost::math::policies::get_max_series_iterations >(); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations >(); f_n_plus_1 = f_n * boost::math::tools::function_ratio_from_backwards_recurrence(detail::recurrence_offsetter(r, 1), value_type(boost::math::tools::epsilon() * 2), max_iter); boost::math::policies::check_series_iterations("backward_recurrence_iterator<>::backward_recurrence_iterator", max_iter, boost::math::policies::policy<>()); } diff --git a/include_private/boost/math/tools/remez.hpp b/include_private/boost/math/tools/remez.hpp index 3d7a39486..8f817d7ce 100644 --- a/include_private/boost/math/tools/remez.hpp +++ b/include_private/boost/math/tools/remez.hpp @@ -568,7 +568,7 @@ T remez_minimax::iterate() for(unsigned i = 1; i < control_points.size(); ++i) { eps_tolerance tol(m_precision); - boost::uintmax_t max_iter = 1000; + std::uintmax_t max_iter = 1000; std::pair p = toms748_solve( Err, control_points[i-1], diff --git a/include_private/boost/math/tools/test.hpp b/include_private/boost/math/tools/test.hpp index ac4803f70..312d056b4 100644 --- a/include_private/boost/math/tools/test.hpp +++ b/include_private/boost/math/tools/test.hpp @@ -38,7 +38,7 @@ public: T max BOOST_PREVENT_MACRO_SUBSTITUTION()const{ return (stat.max)(); } T total()const{ return stat.total(); } T mean()const{ return stat.mean(); } - boost::uintmax_t count()const{ return stat.count(); } + std::uintmax_t count()const{ return stat.count(); } T variance()const{ return stat.variance(); } T variance1()const{ return stat.variance1(); } T rms()const{ return stat.rms(); } diff --git a/minimax/f.cpp b/minimax/f.cpp index 6ea405800..643346112 100644 --- a/minimax/f.cpp +++ b/minimax/f.cpp @@ -152,7 +152,7 @@ mp_type f(const mp_type& x, int variant) // near the root. // static boost::math::tools::eps_tolerance tol(1000); - static boost::uintmax_t max_iter = 1000; + static std::uintmax_t max_iter = 1000; mp_type (*pdg)(mp_type) = &boost::math::digamma; static const mp_type root = boost::math::tools::bracket_and_solve_root(pdg, mp_type(1.4), mp_type(1.5), true, tol, max_iter).first; diff --git a/reporting/performance/doc/performance_tables.qbk b/reporting/performance/doc/performance_tables.qbk index 6a24fb890..ea7132592 100644 --- a/reporting/performance/doc/performance_tables.qbk +++ b/reporting/performance/doc/performance_tables.qbk @@ -236,7 +236,7 @@ boost 1.73]] [template table_Polynomial_Arithmetic_Intel_C_C_0x_mode_version_1910_linux_[] [table:table_Polynomial_Arithmetic_Intel_C_C_0x_mode_version_1910_linux_ Polynomial Arithmetic (Intel C++ C++0x mode version 1910, linux) -[[Function][boost::uint64_t][double][cpp_int]] +[[Function][std::uint64_t][double][cpp_int]] [[operator *][[role green 1.12[br](417ns)]][[role green 1.00[br](372ns)]][[role red 23.61[br](8782ns)]]] [[operator * (int)][[role green 1.04[br](103ns)]][[role green 1.00[br](99ns)]][[role red 12.15[br](1203ns)]]] [[operator *=][[role green 1.14[br](199820ns)]][[role green 1.00[br](175634ns)]][[role red 22.31[br](3918504ns)]]] @@ -599,7 +599,7 @@ boost 1.73]] [template table_Polynomial_Arithmetic_Clang_version_9_0_0_tags_RELEASE_900_final_linux_[] [table:table_Polynomial_Arithmetic_Clang_version_9_0_0_tags_RELEASE_900_final_linux_ Polynomial Arithmetic (Clang version 9.0.0 (tags/RELEASE_900/final), linux) -[[Function][boost::uint64_t][double][cpp_int]] +[[Function][std::uint64_t][double][cpp_int]] [[operator *][[role blue 1.61[br](502ns)]][[role green 1.00[br](312ns)]][[role red 34.02[br](10615ns)]]] [[operator * (int)][[role green 1.09[br](118ns)]][[role green 1.00[br](108ns)]][[role red 10.12[br](1093ns)]]] [[operator *=][[role blue 1.73[br](215039ns)]][[role green 1.00[br](124223ns)]][[role red 34.02[br](4226250ns)]]] @@ -962,7 +962,7 @@ boost 1.73]] [template table_Polynomial_Arithmetic_GNU_C_version_9_2_1_20191008_linux_[] [table:table_Polynomial_Arithmetic_GNU_C_version_9_2_1_20191008_linux_ Polynomial Arithmetic (GNU C++ version 9.2.1 20191008, linux) -[[Function][boost::uint64_t][double][cpp_int]] +[[Function][std::uint64_t][double][cpp_int]] [[operator *][[role blue 1.26[br](556ns)]][[role green 1.00[br](440ns)]][[role red 34.34[br](15111ns)]]] [[operator * (int)][[role blue 1.24[br](141ns)]][[role green 1.00[br](114ns)]][[role red 8.39[br](956ns)]]] [[operator *=][[role green 1.07[br](243123ns)]][[role green 1.00[br](226544ns)]][[role red 19.57[br](4434116ns)]]] @@ -1150,7 +1150,7 @@ boost 1.73]] [template table_Polynomial_Arithmetic_GNU_C_version_9_2_0_Windows_x64_[] [table:table_Polynomial_Arithmetic_GNU_C_version_9_2_0_Windows_x64_ Polynomial Arithmetic (GNU C++ version 9.2.0, Windows x64) -[[Function][boost::uint64_t][double][cpp_int]] +[[Function][std::uint64_t][double][cpp_int]] [[operator *][[role green 1.00[br](503ns)]][[role green 1.00[br](502ns)]][[role red 15.20[br](7629ns)]]] [[operator * (int)][[role green 1.05[br](114ns)]][[role green 1.00[br](109ns)]][[role red 6.04[br](658ns)]]] [[operator *=][[role green 1.04[br](223824ns)]][[role green 1.00[br](215955ns)]][[role red 19.30[br](4168184ns)]]] @@ -1491,7 +1491,7 @@ boost 1.73]] [template table_Polynomial_Arithmetic_Microsoft_Visual_C_version_14_2_Windows_x64_[] [table:table_Polynomial_Arithmetic_Microsoft_Visual_C_version_14_2_Windows_x64_ Polynomial Arithmetic (Microsoft Visual C++ version 14.2, Windows x64) -[[Function][boost::uint64_t][double][cpp_int]] +[[Function][std::uint64_t][double][cpp_int]] [[operator *][[role blue 1.54[br](951ns)]][[role green 1.00[br](617ns)]][[role red 15.22[br](9391ns)]]] [[operator * (int)][[role green 1.16[br](135ns)]][[role green 1.00[br](116ns)]][[role red 5.22[br](605ns)]]] [[operator *=][[role blue 1.30[br](371957ns)]][[role green 1.00[br](286462ns)]][[role red 17.11[br](4901613ns)]]] diff --git a/reporting/performance/fibonacci.hpp b/reporting/performance/fibonacci.hpp index c623f56ab..e9c15ec6e 100644 --- a/reporting/performance/fibonacci.hpp +++ b/reporting/performance/fibonacci.hpp @@ -12,25 +12,25 @@ template std::vector const& fibonacci_numbers(const std::integral_constant&) { - static const boost::uint16_t numbers[] = { - static_cast(21u), - static_cast(34u), - static_cast(55u), - static_cast(89u), - static_cast(144u), - static_cast(233u), - static_cast(377u), - static_cast(610u), - static_cast(987u), - static_cast(1597u), - static_cast(2584u), - static_cast(4181u), - static_cast(6765u), - static_cast(17711u), - static_cast(10946u), - static_cast(17711u), - static_cast(28657u), - static_cast(46368u) + static const std::uint16_t numbers[] = { + static_cast(21u), + static_cast(34u), + static_cast(55u), + static_cast(89u), + static_cast(144u), + static_cast(233u), + static_cast(377u), + static_cast(610u), + static_cast(987u), + static_cast(1597u), + static_cast(2584u), + static_cast(4181u), + static_cast(6765u), + static_cast(17711u), + static_cast(10946u), + static_cast(17711u), + static_cast(28657u), + static_cast(46368u) }; static const std::vector data(numbers, numbers + sizeof(numbers) / sizeof(numbers[0])); @@ -40,7 +40,7 @@ std::vector const& fibonacci_numbers(const std::integral_constant&) template std::vector const& fibonacci_numbers(const std::integral_constant&) { - static const boost::uint32_t numbers[] = { + static const std::uint32_t numbers[] = { 21u, 34u, 55u, @@ -90,7 +90,7 @@ std::vector const& fibonacci_numbers(const std::integral_constant&) template std::vector const& fibonacci_numbers(const std::integral_constant&) { - static const boost::uint64_t numbers[] = { + static const std::uint64_t numbers[] = { 21uLL, 34uLL, 55uLL, diff --git a/reporting/performance/table_helper.cpp b/reporting/performance/table_helper.cpp index c8ecfe23c..463120cdf 100644 --- a/reporting/performance/table_helper.cpp +++ b/reporting/performance/table_helper.cpp @@ -20,7 +20,7 @@ #include #include "table_helper.hpp" -void add_cell(boost::intmax_t val, const std::string& table_name, const std::string& row_name, const std::string& column_heading); +void add_cell(std::intmax_t val, const std::string& table_name, const std::string& row_name, const std::string& column_heading); void add_to_all_sections(const std::string& id, std::string list_name = "performance_all_sections"); std::vector > data; @@ -77,7 +77,7 @@ struct content_loader // for(auto i = items_to_add.begin(); i != items_to_add.end(); ++i) { - add_cell(static_cast(std::get<0>(*i) / 1e-9), std::get<1>(*i), std::get<2>(*i), std::get<3>(*i)); + add_cell(static_cast(std::get<0>(*i) / 1e-9), std::get<1>(*i), std::get<2>(*i), std::get<3>(*i)); } // // Write out the results: @@ -178,7 +178,7 @@ void add_to_all_sections(const std::string& id, std::string list_name) } } -std::string get_colour(boost::uintmax_t val, boost::uintmax_t best) +std::string get_colour(std::uintmax_t val, std::uintmax_t best) { if(val <= best * 1.2) return "green"; @@ -187,18 +187,18 @@ std::string get_colour(boost::uintmax_t val, boost::uintmax_t best) return "blue"; } -boost::intmax_t get_value_from_cell(const std::string& cell) +std::intmax_t get_value_from_cell(const std::string& cell) { static const boost::regex time_e("(\\d+)ns"); boost::smatch what; if(regex_search(cell, what, time_e)) { - return boost::lexical_cast(what.str(1)); + return boost::lexical_cast(what.str(1)); } return -1; } -void add_cell(boost::intmax_t val, const std::string& table_name, const std::string& row_name, const std::string& column_heading) +void add_cell(std::intmax_t val, const std::string& table_name, const std::string& row_name, const std::string& column_heading) { // // Load the table, add our data, and re-write: @@ -265,8 +265,8 @@ void add_cell(boost::intmax_t val, const std::string& table_name, const std::str // // Find the best result in this row: // - boost::uintmax_t best = (std::numeric_limits::max)(); - std::vector values; + std::uintmax_t best = (std::numeric_limits::max)(); + std::vector values; for(unsigned i = 1; i < table_data[row_id].size(); ++i) { if(i == column_id) @@ -278,7 +278,7 @@ void add_cell(boost::intmax_t val, const std::string& table_name, const std::str else { std::cout << "Existing cell value was " << table_data[row_id][i] << std::endl; - boost::uintmax_t cell_val = get_value_from_cell(table_data[row_id][i]); + std::uintmax_t cell_val = get_value_from_cell(table_data[row_id][i]); std::cout << "Extracted value: " << cell_val << std::endl; if(cell_val < best) best = cell_val; @@ -358,7 +358,7 @@ void add_cell(boost::intmax_t val, const std::string& table_name, const std::str void report_execution_time(double t, std::string table, std::string row, std::string heading) { items_to_add.push_back(std::make_tuple(t, table, row, heading)); - //add_cell(static_cast(t / 1e-9), table, row, heading); + //add_cell(static_cast(t / 1e-9), table, row, heading); } std::string get_compiler_options_name() diff --git a/reporting/performance/test_distributions.cpp b/reporting/performance/test_distributions.cpp index 2b54d4760..08be3d6f2 100644 --- a/reporting/performance/test_distributions.cpp +++ b/reporting/performance/test_distributions.cpp @@ -150,7 +150,7 @@ public: std::cerr << "Aborting due to exception: " << e.what() << std::endl; std::cerr << "In " << distro_name + " (" + std::string(sub_name) + ")" << std::endl; report_execution_time( - (std::numeric_limits::max)(), + (std::numeric_limits::max)(), std::string("Distribution performance comparison with ") + compiler_name() + std::string(" on ") + platform_name(), distro_name + " (" + std::string(sub_name) + ")", column); diff --git a/reporting/performance/test_poly_method.cpp b/reporting/performance/test_poly_method.cpp index d04270398..9e7a4bcda 100644 --- a/reporting/performance/test_poly_method.cpp +++ b/reporting/performance/test_poly_method.cpp @@ -73,20 +73,20 @@ static const double denom[20] = { static_cast(1u), 0.0 }; -static const boost::uint32_t denom_int[20] = { - static_cast(0u), - static_cast(39916800u), - static_cast(120543840u), - static_cast(150917976u), - static_cast(105258076u), - static_cast(45995730u), - static_cast(13339535u), - static_cast(2637558u), - static_cast(357423u), - static_cast(32670u), - static_cast(1925u), - static_cast(66u), - static_cast(1u), +static const std::uint32_t denom_int[20] = { + static_cast(0u), + static_cast(39916800u), + static_cast(120543840u), + static_cast(150917976u), + static_cast(105258076u), + static_cast(45995730u), + static_cast(13339535u), + static_cast(2637558u), + static_cast(357423u), + static_cast(32670u), + static_cast(1925u), + static_cast(66u), + static_cast(1u), 0 }; diff --git a/reporting/performance/test_polynomial.cpp b/reporting/performance/test_polynomial.cpp index 4474ec881..76b982bb0 100644 --- a/reporting/performance/test_polynomial.cpp +++ b/reporting/performance/test_polynomial.cpp @@ -254,7 +254,7 @@ void test(const char* type) int main() { - test("boost::uint64_t"); + test("std::uint64_t"); test("double"); max_reps = 100; test("cpp_int"); diff --git a/test/compile_test/sf_prime_incl_test.cpp b/test/compile_test/sf_prime_incl_test.cpp index 6ab758479..24509c2da 100644 --- a/test/compile_test/sf_prime_incl_test.cpp +++ b/test/compile_test/sf_prime_incl_test.cpp @@ -15,14 +15,14 @@ void compile_and_link_test() { - check_result(boost::math::prime(u)); + check_result(boost::math::prime(u)); // // Add constexpr tests here: // #ifdef BOOST_MATH_HAVE_CONSTEXPR_TABLES - constexpr boost::uint32_t ce_f = boost::math::prime(boost::math::max_prime); + constexpr std::uint32_t ce_f = boost::math::prime(boost::math::max_prime); static_assert(ce_f == 104729, "max_prime had incorrect value"); - check_result(ce_f); + check_result(ce_f); #endif } diff --git a/test/compile_test/tools_roots_inc_test.cpp b/test/compile_test/tools_roots_inc_test.cpp index 61527c7c7..f4d02bda1 100644 --- a/test/compile_test/tools_roots_inc_test.cpp +++ b/test/compile_test/tools_roots_inc_test.cpp @@ -26,7 +26,7 @@ void compile_and_link_test() typedef boost::math::tuple (*F3)(double); typedef boost::math::tools::eps_tolerance Tol; Tol tol(u); - boost::uintmax_t max_iter = 0; + std::uintmax_t max_iter = 0; F f = 0; F2 f2 = 0; F3 f3 = 0; diff --git a/test/compile_test/tools_series_inc_test.cpp b/test/compile_test/tools_series_inc_test.cpp index f8558443b..c59248e84 100644 --- a/test/compile_test/tools_series_inc_test.cpp +++ b/test/compile_test/tools_series_inc_test.cpp @@ -21,7 +21,7 @@ struct Functor #define U double Functor func; -boost::uintmax_t uim = 0; +std::uintmax_t uim = 0; void compile_and_link_test() { diff --git a/test/compile_test/tools_toms748_inc_test.cpp b/test/compile_test/tools_toms748_inc_test.cpp index 3c321006f..52bcdcfaa 100644 --- a/test/compile_test/tools_toms748_inc_test.cpp +++ b/test/compile_test/tools_toms748_inc_test.cpp @@ -13,6 +13,6 @@ typedef T (*F)(T); -template std::pair boost::math::tools::toms748_solve(F, const T&, const T&, const T&, const T&, Tol, boost::uintmax_t&); -template std::pair boost::math::tools::toms748_solve(F f, const T& ax, const T& bx, Tol tol, boost::uintmax_t& max_iter); -template std::pair boost::math::tools::bracket_and_solve_root(F f, const T& guess, const T& factor, bool rising, Tol tol, boost::uintmax_t& max_iter); +template std::pair boost::math::tools::toms748_solve(F, const T&, const T&, const T&, const T&, Tol, std::uintmax_t&); +template std::pair boost::math::tools::toms748_solve(F f, const T& ax, const T& bx, Tol tol, std::uintmax_t& max_iter); +template std::pair boost::math::tools::bracket_and_solve_root(F f, const T& guess, const T& factor, bool rising, Tol tol, std::uintmax_t& max_iter); diff --git a/test/handle_test_result.hpp b/test/handle_test_result.hpp index bf409facb..5d9aa904e 100644 --- a/test/handle_test_result.hpp +++ b/test/handle_test_result.hpp @@ -25,7 +25,7 @@ // void expected_results(); -typedef std::pair > expected_data_type; +typedef std::pair > expected_data_type; typedef std::list list_type; inline list_type& @@ -42,8 +42,8 @@ inline void add_expected_result( const char* type_name, const char* test_name, const char* group_name, - boost::uintmax_t max_peek_error, - boost::uintmax_t max_mean_error) + std::uintmax_t max_peek_error, + std::uintmax_t max_mean_error) { std::string re("(?:"); re += compiler; @@ -89,10 +89,10 @@ inline std::string build_test_name(const char* type_name, const char* test_name, return result; } -inline const std::pair& +inline const std::pair& get_max_errors(const char* type_name, const char* test_name, const char* group_name) { - static const std::pair defaults(1, 1); + static const std::pair defaults(1, 1); std::string name = build_test_name(type_name, test_name, group_name); list_type& l = get_expected_data(); list_type::const_iterator a(l.begin()), b(l.end()); @@ -158,7 +158,7 @@ void handle_test_result(const boost::math::tools::test_result& result, // // Now verify that the results are within our expected bounds: // - std::pair const& bounds = get_max_errors(type_name, test_name, group_name); + std::pair const& bounds = get_max_errors(type_name, test_name, group_name); if(bounds.first < max_error_found) { std::cerr << "Peak error greater than expected value of " << bounds.first << std::endl; diff --git a/test/test_bessel_airy_zeros.cpp b/test/test_bessel_airy_zeros.cpp index c6253c93a..6296ac33d 100644 --- a/test/test_bessel_airy_zeros.cpp +++ b/test/test_bessel_airy_zeros.cpp @@ -840,7 +840,7 @@ Calculated using cpp_dec_float_50 } BOOST_MATH_CHECK_THROW(airy_ai_zero(-1), std::domain_error); - BOOST_CHECK_CLOSE_FRACTION(airy_ai_zero((std::numeric_limits::max)()), -static_cast(4678579.33301973093739L), tolerance); + BOOST_CHECK_CLOSE_FRACTION(airy_ai_zero((std::numeric_limits::max)()), -static_cast(4678579.33301973093739L), tolerance); // Can't abuse with infinity because won't compile - no conversion. //if (std::numeric_limits::has_infinity) @@ -908,7 +908,7 @@ Calculated using cpp_dec_float_50 } BOOST_MATH_CHECK_THROW(airy_bi_zero(-1), std::domain_error); - BOOST_CHECK_CLOSE_FRACTION(airy_bi_zero((std::numeric_limits::max)()), -static_cast(4678579.33229351984573L), tolerance * 300); + BOOST_CHECK_CLOSE_FRACTION(airy_bi_zero((std::numeric_limits::max)()), -static_cast(4678579.33229351984573L), tolerance * 300); // Can't abuse with infinity because won't compile - no conversion. //if (std::numeric_limits::has_infinity) diff --git a/test/test_next.cpp b/test/test_next.cpp index faa116eca..5ef423060 100644 --- a/test/test_next.cpp +++ b/test/test_next.cpp @@ -196,7 +196,7 @@ void test_values(const T& val, const char* name) if (std::numeric_limits::is_specialized && (std::numeric_limits::digits < 30) && (std::numeric_limits::radix == 2)) { T left, right, dist, fresult; - boost::uintmax_t result; + std::uintmax_t result; left = static_cast(0.1); right = left * static_cast(4.2); diff --git a/test/test_next_decimal.cpp b/test/test_next_decimal.cpp index ee3b797e1..99f5268a7 100644 --- a/test/test_next_decimal.cpp +++ b/test/test_next_decimal.cpp @@ -27,7 +27,7 @@ bool is_normalized_value(const T& val) // // Returns false if value has guard digits that are non-zero // - boost::intmax_t shift = std::numeric_limits::digits - ilogb(val) - 1; + std::intmax_t shift = std::numeric_limits::digits - ilogb(val) - 1; T shifted = scalbn(val, shift); return floor(shifted) == shifted; } diff --git a/test/test_recurrence.cpp b/test/test_recurrence.cpp index eb85b3b6c..72716964e 100644 --- a/test/test_recurrence.cpp +++ b/test/test_recurrence.cpp @@ -86,7 +86,7 @@ void test_spots(T, const char* name) // convergence is complete before we reach the origin. // v = 102.75; - boost::uintmax_t max_iter = 200; + std::uintmax_t max_iter = 200; T ratio = boost::math::tools::function_ratio_from_forwards_recurrence(bessel_jy_recurrence(v, x), boost::math::tools::epsilon(), max_iter); first = boost::math::cyl_neumann(v, x); second = boost::math::cyl_neumann(v + 1, x); @@ -131,7 +131,7 @@ void test_spots(T, const char* name) ++it; } - boost::uintmax_t max_iter = 200; + std::uintmax_t max_iter = 200; T ratio = boost::math::tools::function_ratio_from_backwards_recurrence(bessel_jy_recurrence(v, x), boost::math::tools::epsilon(), max_iter); first = boost::math::cyl_bessel_j(v, x); second = boost::math::cyl_bessel_j(v - 1, x); diff --git a/test/test_root_finding_concepts.cpp b/test/test_root_finding_concepts.cpp index 07075471b..c48c2c575 100644 --- a/test/test_root_finding_concepts.cpp +++ b/test/test_root_finding_concepts.cpp @@ -131,7 +131,7 @@ BOOST_AUTO_TEST_CASE( test_main ) // // bracket_and_solve_root: // - boost::uintmax_t max_iter = boost::math::policies::get_max_root_iterations >(); + std::uintmax_t max_iter = boost::math::policies::get_max_root_iterations >(); p = boost::math::tools::bracket_and_solve_root(f1, x, 2.0, true, t, max_iter); result = (p.first + p.second) / 2; BOOST_CHECK_CLOSE_FRACTION(expected, result, tolerance); diff --git a/test/test_root_iterations.cpp b/test/test_root_iterations.cpp index 2a3229384..1ec159351 100644 --- a/test/test_root_iterations.cpp +++ b/test/test_root_iterations.cpp @@ -150,7 +150,7 @@ BOOST_AUTO_TEST_CASE( test_main ) int newton_limits = static_cast(std::numeric_limits::digits * 0.6); double arg = 1e-50; - boost::uintmax_t iters; + std::uintmax_t iters; double guess; double dr; diff --git a/test/test_tgamma_for_issue396_part1.cpp b/test/test_tgamma_for_issue396_part1.cpp index c0943f0c8..e0092ad5b 100644 --- a/test/test_tgamma_for_issue396_part1.cpp +++ b/test/test_tgamma_for_issue396_part1.cpp @@ -43,9 +43,9 @@ bool test_tgamma_for_issue396_value_checker() floating_point_type(issue396_control_string3) }}; - boost::uint32_t ten_pow_n = (boost::uint32_t) (1); + std::uint32_t ten_pow_n = (std::uint32_t) (1); - const floating_point_type tol = std::numeric_limits::epsilon() * (boost::uint32_t) (5000); + const floating_point_type tol = std::numeric_limits::epsilon() * (std::uint32_t) (5000); bool result_is_ok = true; @@ -53,7 +53,7 @@ bool test_tgamma_for_issue396_value_checker() { const floating_point_type g = boost::math::tgamma(boost::math::constants::half() + ten_pow_n); - ten_pow_n *= (boost::uint32_t) (10); + ten_pow_n *= (std::uint32_t) (10); const floating_point_type closeness = fabs(1 - (g / control[i])); diff --git a/test/test_tgamma_for_issue396_part2.cpp b/test/test_tgamma_for_issue396_part2.cpp index 036f1ac0a..19aa4a475 100644 --- a/test/test_tgamma_for_issue396_part2.cpp +++ b/test/test_tgamma_for_issue396_part2.cpp @@ -43,9 +43,9 @@ bool test_tgamma_for_issue396_value_checker() floating_point_type(issue396_control_string3) }}; - boost::uint32_t ten_pow_n = (boost::uint32_t) (1); + std::uint32_t ten_pow_n = (std::uint32_t) (1); - const floating_point_type tol = std::numeric_limits::epsilon() * (boost::uint32_t) (5000); + const floating_point_type tol = std::numeric_limits::epsilon() * (std::uint32_t) (5000); bool result_is_ok = true; @@ -53,7 +53,7 @@ bool test_tgamma_for_issue396_value_checker() { const floating_point_type g = boost::math::tgamma(boost::math::constants::half() + ten_pow_n); - ten_pow_n *= (boost::uint32_t) (10); + ten_pow_n *= (std::uint32_t) (10); const floating_point_type closeness = fabs(1 - (g / control[i])); diff --git a/test/test_toms748_solve.cpp b/test/test_toms748_solve.cpp index b59ba6267..9ff7642bc 100644 --- a/test/test_toms748_solve.cpp +++ b/test/test_toms748_solve.cpp @@ -113,13 +113,13 @@ private: template unsigned toms748tester::invocations = 0; -boost::uintmax_t total = 0; -boost::uintmax_t invocations = 0; +std::uintmax_t total = 0; +std::uintmax_t invocations = 0; template void run_test(T a, T b, int id) { - boost::uintmax_t c = 1000; + std::uintmax_t c = 1000; std::pair r = toms748_solve(toms748tester(id), a, b, @@ -135,7 +135,7 @@ void run_test(T a, T b, int id) template void run_test(T a, T b, int id, int p) { - boost::uintmax_t c = 1000; + std::uintmax_t c = 1000; std::pair r = toms748_solve(toms748tester(id, p), a, b, @@ -151,7 +151,7 @@ void run_test(T a, T b, int id, int p) template void run_test(T a, T b, int id, T p1, T p2) { - boost::uintmax_t c = 1000; + std::uintmax_t c = 1000; std::pair r = toms748_solve(toms748tester(id, p1, p2), a, b, @@ -257,7 +257,7 @@ BOOST_AUTO_TEST_CASE( test_main ) for(int n = 4; n <= 12; n += 2) { - boost::uintmax_t c = 1000; + std::uintmax_t c = 1000; std::pair r = bracket_and_solve_root(toms748tester(4, 0.2, double(n)), 2.0, 2.0, diff --git a/tools/hypergeometric_1F1_error_plot.cpp b/tools/hypergeometric_1F1_error_plot.cpp index 57f8f1373..1d00eee19 100644 --- a/tools/hypergeometric_1F1_error_plot.cpp +++ b/tools/hypergeometric_1F1_error_plot.cpp @@ -45,7 +45,7 @@ void print_value(double x, std::ostream& os = std::cout) double m = std::frexp(x, &e); m = std::ldexp(m, 54); e -= 54; - boost::int64_t val = (boost::int64_t)m; + std::int64_t val = (std::int64_t)m; BOOST_MATH_ASSERT(std::ldexp((double)val, e) == x); os << "std::ldexp((double)" << val << ", " << e << ")"; } @@ -64,10 +64,10 @@ void print_row(double a, double b, double z, mpfr_float result, std::ostream& os struct error_data { - error_data(double a, double b, double z, boost::intmax_t e) + error_data(double a, double b, double z, std::intmax_t e) : a(a), b(b), z(z), error(e) {} double a, b, z; - boost::intmax_t error; + std::intmax_t error; bool operator<(const error_data& other)const { return error < other.error; diff --git a/tools/hypergeometric_1F1_map_neg_b_fwd_recurrence.cpp b/tools/hypergeometric_1F1_map_neg_b_fwd_recurrence.cpp index 0838f6adb..cb4e637b0 100644 --- a/tools/hypergeometric_1F1_map_neg_b_fwd_recurrence.cpp +++ b/tools/hypergeometric_1F1_map_neg_b_fwd_recurrence.cpp @@ -73,7 +73,7 @@ int main() for (test_type z = 1; z < 1e10; z *= z_mult, z_mult *= 2) { // std::cout << "z = " << z << std::endl; - boost::uintmax_t max_iter = 1000; + std::uintmax_t max_iter = 1000; test_type calc = boost::math::tools::function_ratio_from_forwards_recurrence(boost::math::detail::hypergeometric_1F1_recurrence_a_and_b_coefficients(a, b, z), std::numeric_limits::epsilon() * 2, max_iter); test_type reference = (test_type)(boost::math::hypergeometric_pFq_precision({ mpfr_float(a) }, { mpfr_float(b) }, mpfr_float(z), 50, time_limit) / boost::math::hypergeometric_pFq_precision({ mpfr_float(a + 1) }, { mpfr_float(b + 1) }, mpfr_float(z), std::numeric_limits::digits10 * 2, time_limit)); double err = (double)boost::math::epsilon_difference(reference, calc); @@ -106,7 +106,7 @@ int main() // z_limit = last_good == 0 ? 0 : boost::math::tools::bisect([&a, b, error_limit, time_limit](test_type z) { - boost::uintmax_t max_iter = 1000; + std::uintmax_t max_iter = 1000; test_type calc = boost::math::tools::function_ratio_from_forwards_recurrence(boost::math::detail::hypergeometric_1F1_recurrence_a_and_b_coefficients(a, b, z), std::numeric_limits::epsilon() * 2, max_iter); test_type reference = (test_type)(boost::math::hypergeometric_pFq_precision({ mpfr_float(a) }, { mpfr_float(b) }, mpfr_float(z), 50, time_limit + 20) / boost::math::hypergeometric_pFq_precision({ mpfr_float(a + 1) }, { mpfr_float(b + 1) }, mpfr_float(z), std::numeric_limits::digits10 * 2, time_limit + 20)); test_type err = boost::math::epsilon_difference(reference, calc); @@ -125,7 +125,7 @@ int main() { // std::cout << "z = " << z << std::endl; try { - boost::uintmax_t max_iter = 1000; + std::uintmax_t max_iter = 1000; test_type calc = boost::math::tools::function_ratio_from_backwards_recurrence(boost::math::detail::hypergeometric_1F1_recurrence_a_and_b_coefficients(a, b, z), std::numeric_limits::epsilon() * 2, max_iter); test_type reference = (test_type)(boost::math::hypergeometric_pFq_precision({ mpfr_float(a) }, { mpfr_float(b) }, mpfr_float(z), 50, time_limit) / boost::math::hypergeometric_pFq_precision({ mpfr_float(a - 1) }, { mpfr_float(b - 1) }, mpfr_float(z), std::numeric_limits::digits10 * 2, time_limit)); test_type err = boost::math::epsilon_difference(reference, calc); @@ -152,7 +152,7 @@ int main() lower_z_limit = 0; else if (last_good >= bad) { - boost::uintmax_t max_iter = 1000; + std::uintmax_t max_iter = 1000; test_type z = bad; test_type calc = boost::math::tools::function_ratio_from_forwards_recurrence(boost::math::detail::hypergeometric_1F1_recurrence_a_and_b_coefficients(a, b, z), std::numeric_limits::epsilon() * 2, max_iter); test_type reference = (test_type)(boost::math::hypergeometric_pFq_precision({ mpfr_float(a) }, { mpfr_float(b) }, mpfr_float(z), 50, time_limit) / boost::math::hypergeometric_pFq_precision({ mpfr_float(a + 1) }, { mpfr_float(b + 1) }, mpfr_float(z), std::numeric_limits::digits10 * 2, time_limit)); @@ -171,7 +171,7 @@ int main() // lower_z_limit = last_good == 0 ? 0 : boost::math::tools::bisect([&a, b, error_limit, time_limit](test_type z) { - boost::uintmax_t max_iter = 1000; + std::uintmax_t max_iter = 1000; test_type calc = boost::math::tools::function_ratio_from_backwards_recurrence(boost::math::detail::hypergeometric_1F1_recurrence_a_and_b_coefficients(a, b, z), std::numeric_limits::epsilon() * 2, max_iter); test_type reference = (test_type)(boost::math::hypergeometric_pFq_precision({ mpfr_float(a) }, { mpfr_float(b) }, mpfr_float(z), 50, time_limit + 20) / boost::math::hypergeometric_pFq_precision({ mpfr_float(a - 1) }, { mpfr_float(b - 1) }, mpfr_float(z), std::numeric_limits::digits10 * 2, time_limit + 20)); test_type err = boost::math::epsilon_difference(reference, calc); diff --git a/tools/lanczos_generator.cpp b/tools/lanczos_generator.cpp index 0af1d28a5..76b006b58 100644 --- a/tools/lanczos_generator.cpp +++ b/tools/lanczos_generator.cpp @@ -4809,22 +4809,22 @@ void print_code(const lanczos_info& l, const char* name, int precision = std: const char* denom_type; const char* cast_type; const char* suffix_type; - if(max_term < (std::numeric_limits::max)()) + if(max_term < (std::numeric_limits::max)()) { - denom_type = "boost::uint16_t"; - cast_type = "static_cast"; + denom_type = "std::uint16_t"; + cast_type = "static_cast"; suffix_type = "u"; } - else if(max_term < (std::numeric_limits::max)()) + else if(max_term < (std::numeric_limits::max)()) { - denom_type = "boost::uint32_t"; - cast_type = "static_cast"; + denom_type = "std::uint32_t"; + cast_type = "static_cast"; suffix_type = "u"; } #ifdef BOOST_HAS_LONG_LONG - else if(max_term < (std::numeric_limits::max)()) + else if(max_term < (std::numeric_limits::max)()) { - denom_type = "boost::uint64_t"; + denom_type = "std::uint64_t"; cast_type = ""; suffix_type = "uLL"; }