Incomplete Gamma Function

Description

Lower and upper incomplete gamma function.

Usage

1
gammainc(x, a)

Arguments

x

real number, not too big.

a

real positive number.

Details

Computes the lower and upper incomplete gamma function, including the regularized gamma function. The lower and upper incomplete gamma functions are defined as

γ(x, a) = \int_0^x e^{-t} \, t^{a-1} \, dt

and

Γ(x, a) = \int_x^{∞} e^{-t} \, t^{a-1} \, dt

while the regularized incomplete gamma function is γ(x, a)/Γ(a).

Accuracy is 7 significant digits along the real axis.

Value

Returns a list with the values of the lower, the upper, and regularized lower incomplete gamma function.

Note

Directly converting Fortran code is often easier than translating Matlab code generated with f2matlab.

References

Zhang, Sh., and J. Jin (1996). Computation of Special Functions. Wiley-Interscience, New York.

See Also

gamma

Examples

1
2
gammainc( 1.5, 2)
gammainc(-1.5, 2)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.