Epstein Zeta Library 0.5.0
Calculates the Epstein Zeta function
Loading...
Searching...
No Matches
Macros | Enumerations | Functions
gamma.c File Reference

Gamma functions. More...

#include "gamma.h"
#include <math.h>
Include dependency graph for gamma.c:

Macros

#define EGF_EPS   ldexp(1, -54)
 epsilon for cutoff around integers.
 

Enumerations

enum  dom {
  pt , qt , cf , ua ,
  rek
}
 enum for the choice of algorithm for the upper incomplete gamma function.
 

Functions

enum dom egf_domain (double a, double x)
 set type of algorithm to use depending on the parameters.
 
enum dom egf_ldomain (double a, double x)
 
double egf_pt (double a, double x)
 calculate upper gamma function with the recursion formula.
 
double egf_qt (double a, double x)
 calculate the upper incomplete gamma function as in Gautschi.
 
double egf_rek (double a, double x)
 calculate the upper incomplete gamma function as in Gautschi.
 
double egf_cf (double a, double x)
 calculate the upper incomplete gamma function as in Gautschi.
 
double egf_ua_r (double a, double eta)
 calculate the upper incomplete gamma function as in Gautschi.
 
double egf_ua (double a, double x)
 calculate the upper incomplete gamma function as in Gautschi.
 
double egf_ugamma (double a, double x)
 calculate the upper incomplete gamma function as in Gautschi.
 
double egf_gammaStar (double a, double x)
 calculate the upper incomplete gamma function as in Gautschi.
 

Detailed Description

Gamma functions.

Calculates the gamma function, the incomplete upper gamma function and the regularized lower incomplete gamma function for evaluations of Crandall's formula.

See also
Walter Gautschi. “A Computational Procedure for Incomplete Gamma Func-257 tions”. In: ACM Trans. Math. Softw. 5 (1979), pp. 466–481 for basic principles some improvements were made to increase accuracy

Function Documentation

◆ egf_cf()

double egf_cf ( double a,
double x )

calculate the upper incomplete gamma function as in Gautschi.

Parameters
[in]aexponent of the upper incomplete gamma function.
[in]xlower integral boundary of the upper incomplete gamma function.
Returns
function value of the upper incomplete gamma function.

◆ egf_domain()

enum dom egf_domain ( double a,
double x )

set type of algorithm to use depending on the parameters.

Parameters
[in]aexponent of the upper incomplete gamma function.
[in]xlower integral boundary of the upper incomplete gamma function.
Returns
enum for the type of algorithm to use.

◆ egf_gammaStar()

double egf_gammaStar ( double a,
double x )

calculate the upper incomplete gamma function as in Gautschi.

Parameters
[in]aexponent of the upper incomplete gamma function.
[in]xlower integral boundary of the upper incomplete gamma function.
Returns
function value of the upper incomplete gamma function.

◆ egf_pt()

double egf_pt ( double a,
double x )

calculate upper gamma function with the recursion formula.

Parameters
[in]aexponent of the upper incomplete gamma function.
[in]xlower integral boundary of the upper incomplete gamma function.
Returns
function value of the upper incomplete gamma function.

◆ egf_qt()

double egf_qt ( double a,
double x )

calculate the upper incomplete gamma function as in Gautschi.

Parameters
[in]aexponent of the upper incomplete gamma function.
[in]xlower integral boundary of the upper incomplete gamma function.
Returns
function value of the upper incomplete gamma function.

◆ egf_rek()

double egf_rek ( double a,
double x )

calculate the upper incomplete gamma function as in Gautschi.

Parameters
[in]aexponent of the upper incomplete gamma function.
[in]xlower integral boundary of the upper incomplete gamma function.
Returns
function value of the upper incomplete gamma function.

◆ egf_ua()

double egf_ua ( double a,
double x )

calculate the upper incomplete gamma function as in Gautschi.

Parameters
[in]aexponent of the upper incomplete gamma function.
[in]xlower integral boundary of the upper incomplete gamma function.
Returns
function value of the upper incomplete gamma function.

◆ egf_ua_r()

double egf_ua_r ( double a,
double eta )

calculate the upper incomplete gamma function as in Gautschi.

Parameters
[in]aexponent of the upper incomplete gamma function.
[in]xlower integral boundary of the upper incomplete gamma function.
Returns
function value of the upper incomplete gamma function.

◆ egf_ugamma()

double egf_ugamma ( double a,
double x )

calculate the upper incomplete gamma function as in Gautschi.

Parameters
[in]aexponent of the upper incomplete gamma function.
[in]xlower integral boundary of the upper incomplete gamma function.
Returns
function value of the upper incomplete gamma function.