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

Go to the source code of this file.

Functions

template<typename T1 , typename T2 >
constexpr common_return_t< T1, T2 > lbeta (const T1 a, const T2 b) noexcept
 Compile-time log-beta function. More...
 

Function Documentation

◆ lbeta()

template<typename T1 , typename T2 >
constexpr common_return_t< T1, T2 > lbeta ( const T1  a,
const T2  b 
)
constexprnoexcept

Compile-time log-beta function.

Parameters
aa real-valued input.
ba real-valued input.
Returns
the log-beta function using

\[ \ln \text{B}(\alpha,\beta) := \ln \int_0^1 t^{\alpha - 1} (1-t)^{\beta - 1} dt = \ln \Gamma(\alpha) + \ln \Gamma(\beta) - \ln \Gamma(\alpha + \beta) \]

where \( \Gamma \) denotes the gamma function.