Skip to contents

Evaluate an incomplete gamma function: $$\gamma(a, x) = \int_{0}^{x} t^{a-1} e^{-t}dt,$$ using SLATEC dgami in https://netlib.org/slatec/. When (\(x > 0\) and \(a \ge 0\)) or (\(x \ge 0\) and \(a > 0\)), compute the result, otherwise the value is NaN.

Usage

igamma(a, x)

Arguments

a

A positive numeric vector.

x

A nonnegative numeric vector with same length as a. length.

Value

A vector of values of an incomplete gamma function.

See also

Examples

igamma(1, 1)
#> [1] 0.6321206