Synopsis
Calculate the regularized incomplete Gamma function (lower).
Syntax
igam(a, x)
Description
The function is defined using the complete Gamma function - gamma(a) - as:
igam(a,x) = 1 / gamma(a) Int_0^x e^(-t) t^(a^-1) dt
Examples
Example 1
>>> igam(1, 2) 0.8646647167633873
Example 2
>>> igam([1,1], [2,3]) array([ 0.86466472, 0.95021293])
PARAMETERS
The parameters for this function are:
Parameter | Type information | Definition |
---|---|---|
a | scalar or array | a > 0 |
x | scalar or array | x > 0 |
Return value
The return value from this function is:
val -- The incomplete Gamma function of the input.
Notes
In this implementation, which is provided by the Cephes Math Library [1] , both arguments must be positive. The integral is evaluated by either a power series or continued fraction expansion, depending on the relative values of a and x. Using IEEE arithmetic, the relative errors are
domain | # trials | peak | rms |
---|---|---|---|
0,30 | 200000 | 3.6e-14 | 2.9e-15 |
0,100 | 300000 | 9.9e-14 | 1.5e-14 |
References
- [1] Cephes Math Library Release 2.0: April, 1987. Copyright 1985, 1987 by Stephen L. Moshier. Direct inquiries to 30 Frost Street, Cambridge, MA 02140.
Bugs
See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.
See Also
- tools::response
- color_color, modelflux
- tools::statistics
- aprates
- utilities
- calc_chisqr, calc_energy_flux, calc_model_sum, calc_photon_flux, calc_source_sum, calc_stat, gamma, igamc, incbet, lgam