37#if __cplusplus >= 201402L
42tanh_cf(
const T xx,
const int depth_end)
46 T res = T(2*(depth+1) - 1);
48 while (depth > depth_end - 1) {
49 res = T(2*depth - 1) + xx / res;
67 (2*depth - 1) + xx/
tanh_cf(xx,depth+1) :
116 if (std::is_constant_evaluated()) {
#define GCEM_TANH_MAX_ITER
Definition gcem_options.hpp:193
constexpr bool is_nan(const T x) noexcept
Definition is_nan.hpp:39
constexpr T tanh_begin(const T x) noexcept
Definition tanh.hpp:77
constexpr T tanh_cf(const T xx, const int depth) noexcept
Definition tanh.hpp:62
constexpr T tanh_check(const T x) noexcept
Definition tanh.hpp:86
constexpr T abs(const T x) noexcept
Compile-time absolute value function.
Definition abs.hpp:40
std::numeric_limits< T > GCLIM
Definition gcem_options.hpp:74
typename std::conditional< std::is_integral< T >::value, double, T >::type return_t
Definition gcem_options.hpp:77
constexpr return_t< T > tanh(const T x) noexcept
Compile-time hyperbolic tangent function.
Definition tanh.hpp:113