WPILibC++ 2023.4.3
tanh.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  internal
 

Functions

template<typename T >
constexpr T internal::tanh_cf (const T xx, const int depth) noexcept
 
template<typename T >
constexpr T internal::tanh_begin (const T x) noexcept
 
template<typename T >
constexpr T internal::tanh_check (const T x) noexcept
 
template<typename T >
constexpr return_t< T > tanh (const T x) noexcept
 Compile-time hyperbolic tangent function. More...
 

Function Documentation

◆ tanh()

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

Compile-time hyperbolic tangent function.

Parameters
xa real-valued input.
Returns
the hyperbolic tangent function using

\[ \tanh(x) = \dfrac{x}{1 + \dfrac{x^2}{3 + \dfrac{x^2}{5 + \dfrac{x^2}{7 + \ddots}}}} \]