numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Class to calculate gamma function using approximation derived by Lanczos [20]. More...
#include <num_collect/functions/impl/gamma_lanczos.h>
Static Public Member Functions | |
template<typename T > requires ( std::is_same_v<T, Real> || std::is_same_v<T, std::complex<Real>>) | |
static constexpr auto | gamma (T x) -> T |
Calculate a value of gamma function. | |
static constexpr auto | log_gamma (Real x) -> Real |
Calculate a natural logarithm of a value of gamma function. | |
Static Public Attributes | |
static constexpr std::array< Real, num_coeffs > | coeffs |
Coefficients. | |
static constexpr auto | constant = static_cast<Real>(0.999999999999997092) |
Constant term. | |
static constexpr std::size_t | num_coeffs = 14 |
Number of coefficients. | |
static constexpr auto | rational |
Rational for parameter. | |
static constexpr auto | series_coeff = static_cast<Real>(2.5066282746310005) |
Coefficient for the series. | |
Class to calculate gamma function using approximation derived by Lanczos [20].
Definition at line 38 of file gamma_lanczos.h.
|
inlinestaticnodiscardconstexpr |
Calculate a value of gamma function.
T | Type of the argument. |
[in] | x | Argument. |
Definition at line 80 of file gamma_lanczos.h.
|
inlinestaticnodiscardconstexpr |
Calculate a natural logarithm of a value of gamma function.
[in] | x | Argument. |
Definition at line 99 of file gamma_lanczos.h.
|
staticconstexpr |
Coefficients.
Definition at line 44 of file gamma_lanczos.h.
|
staticconstexpr |
Constant term.
Definition at line 61 of file gamma_lanczos.h.
|
staticconstexpr |
Number of coefficients.
Definition at line 41 of file gamma_lanczos.h.
|
staticconstexpr |
Rational for parameter.
Definition at line 67 of file gamma_lanczos.h.
|
staticconstexpr |
Coefficient for the series.
Definition at line 64 of file gamma_lanczos.h.