Contact

IMIGAMMA Function (Gnumeric)

Engineering Intermediate Gnumeric

Evaluate lower or upper incomplete gamma functions in Gnumeric with IMIGAMMA, regularized or unregularized options and checked real examples.

Verification status: Gnumeric 1.12.57 bounded ssconvert tests; source-version differences explicitly scoped; no GUI. How formula examples are checked

IMIGAMMA evaluates an incomplete gamma function for complex arguments. Two optional switches select lower versus upper and regularized versus unregularized results. Those switches change the mathematical quantity; leaving them implicit can create a plausible-looking answer for the wrong definition.

Syntax and conventions

=IMIGAMMA(a,z[,lower[,regularize]])

Arguments a and z are required complex numbers. Pure real numbers can be entered numerically; a nonreal value can use a quoted complex string such as “1+i”. Optional lower defaults to TRUE, selecting the lower incomplete gamma. FALSE selects the upper incomplete gamma. Optional regularize also defaults to TRUE, dividing the selected incomplete gamma by GAMMA(a).

For positive real a and nonnegative real z, the lower function is the integral of t^(a−1)×EXP(−t) from 0 to z; the upper is the corresponding integral from z to infinity. Their unregularized sum is GAMMA(a), and their regularized sum is 1. Complex arguments require analytic continuation and branch conventions beyond that simple real integral description.

Worked example: distinguish all four choices

For a = 3 and z = 2, GAMMA(3) = 2. The results are:

Formula Expected result, approximately
=IMIGAMMA(3,2) 0.323323583817
=IMIGAMMA(3,2,FALSE) 0.676676416183
=IMIGAMMA(3,2,TRUE,FALSE) 0.646647167634
=IMIGAMMA(3,2,FALSE,FALSE) 1.353352832366

The first two sum to 1. The last two sum to 2. Independently, the regularized lower result for integer a = 3 is 1-EXP(-2)*(1+2+2^2/2). Multiplying it by GAMMA(3) gives the unregularized lower result. These identities make both defaults and scale factors visible.

Advanced application: a complex identity

For a = 1, the lower regularized function is 1−EXP(−z), since GAMMA(1) = 1. With z = 1+i:

=IMIGAMMA(1,"1+i")

The expected mathematical value is approximately 0.801233889654 + 0.309559875653i. Exact text formatting can vary. The native fixture inspected the numeric components using =IMREAL(IMIGAMMA(1,"1+i")) and =IMAGINARY(IMIGAMMA(1,"1+i")), yielding those real and imaginary parts respectively.

Independently, EXP(−1−i) = EXP(−1)×[COS(1)−i×SIN(1)], with the trigonometric argument in radians. Subtracting from 1 reproduces both components. This tests genuinely complex arithmetic rather than inferring complex support from real-only examples.

Errors and numerical cautions

=IMIGAMMA("bad",2) returned #NUM! in the native fixture because the string is not a valid complex number. Put complex literals in quotes; an unquoted i can be interpreted as a name rather than an imaginary unit. Keep lower and regularize as explicit Boolean values in shared models.

The regularized interpretation as a cumulative probability applies to appropriate positive real parameters, not arbitrary complex outputs. At gamma poles, on branch cuts or for extreme arguments, simple complement identities can be numerically delicate. No comprehensive singularity or branch-cut testing is claimed here. When subtracting a value extremely close to 1, direct upper evaluation can avoid cancellation compared with computing 1 minus the lower result.

Version and cross-program scope

Official NEWS introduces IMIGAMMA in Gnumeric 1.12.10. The scoped native execution here is 1.12.57 and the retained function contract is from 1.12.62 source. No retirement or exact last functioning release is established. Similar incomplete-gamma routines in other programs may reverse argument order or default to an unregularized result. Compare definitions and complex branches before treating them as replacements.

Official sources

Native verification scope

On 17 October 2026, Gnumeric 1.12.57 ssconvert recalculated 7 bounded IMIGAMMA fixture records in C.UTF-8. Saved input formulas and output cells were independently read back and matched to the recorded evidence. Recorded results agree with the independent arithmetic or special-function reference calculations to the documented numerical tolerance. This is engine evidence, not a GUI test or screenshot. Derived worksheet checks are mathematical examples unless separately recorded in the fixture. No execution of 1.12.62 or untested extreme inputs is claimed.