gammainc: Incomplete Gamma Function

Description Usage Arguments Details Value Note References See Also Examples

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)


Search within the pracma package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.