WPILibC++ 2023.4.3-108-ge5452e3
log1p.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  internal
 

Functions

template<typename T >
constexpr T internal::log1p_compute (const T x) noexcept
 
template<typename T >
constexpr T internal::log1p_check (const T x) noexcept
 
template<typename T >
constexpr return_t< T > log1p (const T x) noexcept
 Compile-time natural-logarithm-plus-1 function. More...
 

Function Documentation

◆ log1p()

template<typename T >
constexpr return_t< T > log1p ( const T  x)
constexprnoexcept

Compile-time natural-logarithm-plus-1 function.

Parameters
xa real-valued input.
Returns
\( \log_e(x+1) \) using

\[ \log(x+1) = \sum_{k=1}^\infty \dfrac{(-1)^{k-1}x^k}{k}, \ \ |x| < 1 \]