Theoretica
A C++ numerical and automatic mathematical library
theoretica::special Namespace Reference

Special functions. More...

Functions

real gamma (unsigned int k)
 Gamma special function of positive integer argument. More...
 
real half_gamma (unsigned int k)
 Half Gamma special function, defined as HG(n) = Gamma(n / 2) for any positive integer n. More...
 
real lngamma (real x)
 Log Gamma special function of real argument. More...
 
real gamma (real x)
 Gamma special function of real argument. More...
 
real pi (real x)
 Pi special function of real argument. More...
 
real beta (real x1, real x2)
 Beta special function of real argument. More...
 

Detailed Description

Special functions.

Function Documentation

◆ beta()

real theoretica::special::beta ( real  x1,
real  x2 
)
inline

Beta special function of real argument.

Parameters
x1The first real argument
x2The second real argument
Returns
The Beta function of x1 and x2

◆ gamma() [1/2]

real theoretica::special::gamma ( real  x)
inline

Gamma special function of real argument.

This function uses Lanczos' approximation with gamma = 5.

Parameters
xThe real argument
Returns
The Gamma function of x

◆ gamma() [2/2]

real theoretica::special::gamma ( unsigned int  k)
inline

Gamma special function of positive integer argument.

Parameters
kThe positive integer argument
Returns
The Gamma function computed using the factorial.

◆ half_gamma()

real theoretica::special::half_gamma ( unsigned int  k)
inline

Half Gamma special function, defined as HG(n) = Gamma(n / 2) for any positive integer n.

Parameters
kThe positive integer argument
Returns
The Gamma function computed using the factorial or double factorial identity.

◆ lngamma()

real theoretica::special::lngamma ( real  x)
inline

Log Gamma special function of real argument.

This function uses Lanczos' approximation with gamma = 5.

Parameters
xThe real argument
Returns
The logarithm of the Gamma function of x

◆ pi()

real theoretica::special::pi ( real  x)
inline

Pi special function of real argument.

Parameters
xThe real argument
Returns
The Pi function of x, equal to Gamma(x + 1)