SDDSlib
|
Routines for computing the incomplete gamma functions. More...
#include "mdb.h"
Go to the source code of this file.
Macros | |
#define | GAMMAI_ACCURACY 1e-12 |
#define | MAX_SERIES 1000 |
Functions | |
double | gammaIncSeries (double a, double x) |
double | gammaIncCFrac (double a, double x) |
double | gammaP (double a, double x) |
Compute the regularized lower incomplete gamma function P(a,x). | |
double | gammaQ (double a, double x) |
Compute the regularized upper incomplete gamma function Q(a,x). | |
Routines for computing the incomplete gamma functions.
Definition in file gammai.c.
double gammaIncCFrac | ( | double | a, |
double | x ) |
Definition at line 99 of file gammai.c.
double gammaIncSeries | ( | double | a, |
double | x ) |
Definition at line 80 of file gammai.c.
double gammaP | ( | double | a, |
double | x ) |
Compute the regularized lower incomplete gamma function P(a,x).
For given parameters a > 0 and x ≥ 0, this function returns the value of P(a,x) = γ(a,x)/Γ(a), where γ(a,x) is the lower incomplete gamma function. Uses series expansion for x < a+1, and a continued fraction expansion otherwise.
a | Shape parameter (a > 0). |
x | The upper limit of the integral (x ≥ 0). |
Definition at line 40 of file gammai.c.
double gammaQ | ( | double | a, |
double | x ) |
Compute the regularized upper incomplete gamma function Q(a,x).
For given parameters a > 0 and x ≥ 0, this function returns Q(a,x) = 1 - P(a,x). It uses a series expansion when x < a+1 and a continued fraction expansion otherwise.
a | Shape parameter (a > 0). |
x | The upper limit of the integral (x ≥ 0). |
Definition at line 64 of file gammai.c.