Fix for autodiff 3

This commit is contained in:
Matt Borland 2023-05-31 09:32:56 +02:00
parent ae56ab203f
commit 7a66a98f88
No known key found for this signature in database
GPG Key ID: 1FC9FE1989F22A0B
3 changed files with 4 additions and 5 deletions

View File

@ -426,8 +426,7 @@ T lambert_w_singularity_series(const T p)
p * q[10]
)))))))));
}
else
{ // Use all 20 near-singularity series terms.
// Use all 20 near-singularity series terms.
return
-1 +
p * (1 +
@ -459,7 +458,7 @@ T lambert_w_singularity_series(const T p)
// p*q[24] +
// p*q[25]
// )))))))))))))))))));
}
} // template<typename T = double> T lambert_w_singularity_series(const T p)

View File

@ -43,7 +43,7 @@ namespace diff = boost::math::differentiation::autodiff_v1::detail;
#if defined(BOOST_USE_VALGRIND) || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
using bin_float_types = mp11::mp_list<float>;
#elif defined(__STDCPP_FLOAT32_T__) && defined(__STDCPP_FLOAT64_T__)
using bin_float_types = mp11::mp_list<std::float32_t, std::float64_t, long double>;
using bin_float_types = mp11::mp_list<std::float32_t, std::float64_t>;
#else
using bin_float_types = mp11::mp_list<float, double, long double>;
#endif

View File

@ -13,7 +13,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(atanh_test, T, all_float_types) {
using boost::math::atanh;
const T eps = 3000 * test_constants_t<T>::pct_epsilon(); // percent
constexpr unsigned m = 5;
const T cx = 0.5;
const T cx = T(0.5);
auto x = make_fvar<T, m>(cx);
auto y = atanh(x);
// BOOST_CHECK_EQUAL(y.derivative(0) , atanh(cx)); // fails due to overload