AngouriMath

Navigation

← Back to list of members

IncompleteGamma​(AngouriMath.​Entity.​Number.​Complex,​AngouriMath.​Entity.​Number.​Complex)

 Method (no overloads)

Summary

The upper incomplete gamma function, Gamma(a, z) = int_z^oo t^(a - 1) e^(-t) dt, at the working
precision, for complex a and z, with the branch of z^a the power takes: the principal
one, whose cut is the negative real axis and which keeps the value from above, and on that axis the real root
where the power takes it, for an exact a of odd denominator below 10.

Remarks

Where |z| > 2 |a| + 10, in the right half-plane or anywhere past |z| = (P + 5) ln 10 with P digits of working precision, it is Legendre's continued fraction (DLMF 8.9.2),
e^(-z) z^a / (z + 1 - a - 1 (1 - a) / (z + 3 - a - 2 (2 - a) / ...)), by the modified Lentz
algorithm. Near the negative real axis at a moderate |z| it stops short of the value.
Short of that it is Gamma(a) - gamma(a, z), the lower one summed in the right half-plane as
z^a e^(-z) sum_k z^k / (a (a + 1) ... (a + k)) (DLMF 8.7.1), whose terms there are about e^|z| and of one sign on the positive axis, with twice |z|/ln 10 guard digits; and in the left half-plane as
z^a sum_k (-z)^k / (k! (a + k)) (DLMF 8.7.3), whose terms are of one sign on the negative axis, with
(|z| + Re z)/ln 10. Each is taken again with more where the difference shows it cancelled more.
At a whole a = -n <= 0, where Gamma(a) has a pole, it is
Gamma(-n, z) = (-1)^n/n! (E_1(z) - e^(-z) sum_(k < n) (-1)^k k!/z^(k + 1)) (DLMF 8.4.15), with
E_1(z) = Gamma(0, z) = -gamma - ln z - sum_(k >= 1) (-z)^k/(k k!) (DLMF 6.6.2).
https://github.com/asc-community/AngouriMath/issues/2075

























Angouri © 2019-2026 · Project's repo · Site's repo · Octicons · Transparency · 4970 pages online