2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

Remove uses of boost/cstdint without header called

This commit is contained in:
Matt Borland
2021-03-21 16:13:10 +03:00
parent 01f3b7d772
commit 26711525ca
101 changed files with 415 additions and 415 deletions

View File

@@ -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<int> times;
//boost::int_least64_t min_time = std::numeric_limits<boost::int_least64_t>::max(); // Used to normalize times (as int).
//std::int_least64_t min_time = std::numeric_limits<std::int_least64_t>::max(); // Used to normalize times (as int).
std::vector<double> normed_times;
boost::int_least64_t min_time = (std::numeric_limits<boost::int_least64_t>::max)(); // Used to normalize times.
std::int_least64_t min_time = (std::numeric_limits<std::int_least64_t>::max)(); // Used to normalize times.
std::vector<uintmax_t> iterations;
std::vector<long int> distances;
std::vector<cpp_bin_float_100> 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<int>(std::numeric_limits<T>::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<int>(std::numeric_limits<T>::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<T>(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<int>(std::numeric_limits<T>::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<T>(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<int>(std::numeric_limits<T>::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<T>(x), guess, min, max, get_digits, it);
iters = it;
return result;