Navigation

Operators and Keywords

Function List:

C++ API

: gammainc (x, a)
: gammainc (x, a, "lower")
: gammainc (x, a, "upper")

Compute the normalized incomplete gamma function.

This is defined as

                               x
                      1       /
gammainc (x, a) = ---------    |exp (-t) t^(a-1) dt
                 gamma (a)    /
                           t=0

with the limiting value of 1 as x approaches infinity. The standard notation is P(a,x), e.g., Abramowitz and Stegun (6.5.1).

If a is scalar, then gammainc (x, a) is returned for each element of x and vice versa.

If neither x nor a is scalar, the sizes of x and a must agree, and gammainc is applied element-by-element.

By default the incomplete gamma function integrated from 0 to x is computed. If "upper" is given then the complementary function integrated from x to infinity is calculated. It should be noted that

gammainc (x, a) ≡ 1 - gammainc (x, a, "upper")

See also: gamma, gammaln.

Package: octave