Alea::Core
Inherits Alea::Core::Ziggurat
Constants
Single precision tolerance
Double precision tolerance
Iteration limit within which Alea::NoConvergeError is not raised
Class methods
Estimate the Incomplete Gamma Function
When x > (a+1), the upper gamma function can be evaluated as
-x a
e * x
G(a,x) ~= --------------
cf(a,x)
where cf(a,x) is the continued fraction defined above, its coefficients
a(i) and b(i) are implemented in #inc_gamma_ctdfr_proc.
When x < (a+1), it is more convenient to apply the following Taylor series
that evaluates the lower incomplete gamma function:
inf
-----
-x a \ G(a) i
g(a,x) ~= e * x * > ---------- * x
/ G(a+1+i)
-----
i=0
Applying the following property of the gamma function:
G(a+1) = a * G(a)
The Taylor series above can be further simplified to:
inf
----- i
-x a \ x
g(a,x) ~= e * x * > -------------------------
/ a * (a+1) * ... * (a+i)
-----
i=0
Once either a lower or an upper incomplete gamma function is evaluated, the other value may be quickly obtained by applying the following property of the incomplete gamma function:
G(a,x) + g(a,x) = G(a)
@parameters:
a: parameter of the Incomplete Gamma function.x: the upper integration limit.uorl: symbol to request the:upperor:lowerinc. gamma function.
@exceptions:
Alea::NoConvergeErrorif no convergence occurs withinSPECFUN_ITMAXiterations.
Estimate the Incomplete Regularized Gamma function.
@parameters:
a: parameter of the Incomplete Gamma function.x: the upper integration limit.uorl: symbol to request the:upperor:lowerinc. reg. gamma function.
@references:
Alea::Core.inc_gamma
@exceptions:
Alea::NoConvergeErrorif no convergence occurs withinSPECFUN_ITMAXiterations.
Estimate the Incomplete Regular Lower Gamma function.
@parameters:
a: parameter of the Incomplete Gamma function.x: the upper integration limit.
@references:
Alea::Core.inc_gamma
@exceptions:
Alea::NoConvergeErrorif no convergence occurs withinSPECFUN_ITMAXiterations.
Estimate the Incomplete Regular Upper Gamma function.
@parameters:
a: parameter of the Incomplete Gamma function.x: the upper integration limit.
@references:
Alea::Core.inc_gamma
@exceptions:
Alea::NoConvergeErrorif no convergence occurs withinSPECFUN_ITMAXiterations.
Ok here to pass the prng: it's a reference and it will not affect repeatability.
Ok here to pass the prng: it's a reference and it will not affect repeatability.