STK++ 1.0
STK_Funct_gamma.cpp File Reference

In this file we implement the functions around the gamma function. More...

#include "../../STKernel/include/STK_Integer.h"
#include "../../STKernel/include/STK_Real.h"
#include "../include/STK_Const_Math.h"
#include "../include/STK_Funct_gamma.h"
Include dependency graph for STK_Funct_gamma.cpp:

Go to the source code of this file.

Namespaces

namespace  STK
 

STK means the Statistical ToolKit.


namespace  STK::Funct
 

The namespace Funct enclose all usual and special functions.


Functions

static Real STK::Funct::lanczosSerie (Real const &z)
 Compute the Lanzcos correction serie for the gamma function with n = 21 terms.
static Real STK::Funct::gammaLanczos (Real const &z)
 Compute the gamma function using the Lanzcos expansion using n = 21 terms and r= 22.618910.
static double STK::Funct::stirlingSerie (Real const &z)
 Compute the Stirling's serie for the gammaLn function.
static Real STK::Funct::gammaStirling (Real const &z)
 This function computes the gamma function using the Stirling approximation.
static Real STK::Funct::gammaLnStirling (Real const &z)
 This function computes the log gamma function using the Stirling approximation.
Real STK::Funct::factorial (Integer const &n)
 This function computes $ n! $ for Integer argument.
Real STK::Funct::factorial (Real const &z)
 This function computes $ z! $ when z is an integer in a Real format.
Real STK::Funct::factorialLn (Integer const &n)
 This function computes $ \ln(n!) $ for Integer argument.
Real STK::Funct::factorialLn (Real const &z)
 This function computes $ \ln(z!) $ when z is an integer in a Real fromat.
Real STK::Funct::gamma (Real const &z)
 This function computes the function $ \Gamma(z) $.
Real STK::Funct::gammaLn (Real const &z)
 This function computes the function $ \ln(\Gamma(z)) $.
Real STK::Funct::gammaLnStirlingError (Real const &z)
 Compute the error when we compute $ \ln(\Gamma(z)) $ using the Stirling's formula.
Real STK::Funct::gammaLnStirlingError (Integer const &z)
 Compute the error when we compute $ \ln(\Gamma(z)) $ using the Stirling's formula and z is an Integer.
void STK::Funct::stirlingCoefficients (STK::Vector &A)
 This function computes the n first coefficients of the Stirling's serie.

Variables

static const Real STK::Funct::factorialArray [51]
 array for the 51th fisrt factorial elements.
static const Real STK::Funct::factorialLnArray [51]
 array for the 51th fisrt ln factorial elements.
static const Real STK::Funct::factorialHalvesArray [50]
 array for the 51th fisrt halves factorial elements.
static const Real STK::Funct::factorialLnHalvesArray [50]
 array for the 51th fisrt halves ln factorial elements.
static const Real STK::Funct::gammaLnStirlingErrorArray [100]
 array of the gammaLnStirlingError approximation for the values $ n=1, 2, 3, \ldots, 99 $.
static const Real STK::Funct::gammaLnStirlingErrorHalvesArray [100]
 array of the gammaLnStirlingError for the values $ z=0.5, 1.5, , \ldots, 99.5 $.
static const Real STK::Funct::lanczosCoefArray [21]
 array of the Lanzcos coefficients.
static const Real STK::Funct::stirlingCoefArray [9]
 array of the Stirling coefficients.

Detailed Description

In this file we implement the functions around the gamma function.

Definition in file STK_Funct_gamma.cpp.