update boost

This commit is contained in:
2023-11-24 12:56:13 -06:00
parent cfc99971af
commit 19d727037a
9260 changed files with 849256 additions and 299957 deletions

View File

@@ -153,7 +153,7 @@ namespace detail {
const Real eps = (numeric_limits<Real>::epsilon)();
// Error bound ~eps^4/5
Real h = pow(11.25*eps, (Real)1 / (Real)5);
Real h = pow(Real(11.25)*eps, static_cast<Real>(1) / static_cast<Real>(5));
h = detail::make_xph_representable(x, h);
Real ymth = f(x - 2 * h);
Real yth = f(x + 2 * h);
@@ -186,7 +186,7 @@ namespace detail {
const Real eps = (numeric_limits<Real>::epsilon)();
// Error bound ~eps^6/7
// Error: h^6f^(7)(x)/140 + 5|f(x)|eps/h
Real h = pow(eps / 168, (Real)1 / (Real)7);
Real h = pow(eps / 168, static_cast<Real>(1) / static_cast<Real>(7));
h = detail::make_xph_representable(x, h);
Real yh = f(x + h);
@@ -222,7 +222,7 @@ namespace detail {
// Mathematica code to get the error:
// Series[(f[x+h]-f[x-h])*(4/5) + (1/5)*(f[x-2*h] - f[x+2*h]) + (4/105)*(f[x+3*h] - f[x-3*h]) + (1/280)*(f[x-4*h] - f[x+4*h]), {h, 0, 9}]
// If we used Kahan summation, we could get the max error down to h^8|f^(9)(x)|/630 + |f(x)|eps/h.
Real h = pow(551.25*eps, (Real)1 / (Real)9);
Real h = pow(Real(551.25)*eps, static_cast<Real>(1) / static_cast<Real>(9));
h = detail::make_xph_representable(x, h);
Real yh = f(x + h);
@@ -251,7 +251,7 @@ namespace detail {
Real finite_difference_derivative(const F, Real, Real*, const tag&)
{
// Always fails, but condition is template-arg-dependent so only evaluated if we get instantiated.
BOOST_STATIC_ASSERT_MSG(sizeof(Real) == 0, "Finite difference not implemented for this order: try 1, 2, 4, 6 or 8");
static_assert(sizeof(Real) == 0, "Finite difference not implemented for this order: try 1, 2, 4, 6 or 8");
}
}