46template <
typename T,
typename = std::enable_if_t<std::is_
floating_po
int_v<T>>>
49 return std::numeric_limits<T>::quiet_NaN();
52 return -std::numeric_limits<T>::infinity();
68 constexpr int max_loops = 1000;
69 for (
int i = 0; i < max_loops; ++i) {
70 T expm1_val =
expm1(value);
71 T next_value = value - (expm1_val - x) / (expm1_val +
one<T>);
72 if (value == next_value) {
Definition of exp function.
Definition of log1m_maclaurin function.
Definition of log function.
constexpr auto log1m_maclaurin(T x) -> T
Calculate logarithm of 1 - x.
Namespace of constexpr variables and functions.
constexpr auto log(T x) -> T
Calculate logarithm .
constexpr auto expm1(T x) -> T
Calculate exponential function minus one .
constexpr auto log1p(T x) -> T
Calculate natural logarithm of 1 + x, .