Contact

IMFACT Function in Gnumeric: Complex Factorial

Complex Intermediate Gnumeric

Calculate complex and noninteger factorials in Gnumeric with Gamma identities, examples and pole warnings.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: =IMFACT("0.5") extends factorial to a noninteger input, with expected value Γ(1.5) ≈ 0.886226925.

Availability and version history

  • Introduced: 1.12.10, according to the official release history.
  • Availability: Supported in Gnumeric 1.12.62, based on the function-specific registration.
  • Scope: Desktop; the fn-complex function module must be included and enabled.
  • Checked: October 14, 2026. Source and independently calculated examples checked; Gnumeric 1.12.62 was not run.

What IMFACT does

IMFACT evaluates the factorial extension z!=Γ(z+1). It agrees with ordinary factorial at nonnegative integers and also accepts noninteger or complex inputs. A complex factorial is a special-function value, not a count of arrangements or a probability by itself. Function reference.

Syntax and inputs

=IMFACT(z)

z is one required complex number: a quoted complex string, a cell holding one, or the result of COMPLEX(real,imaginary). There is no second argument or default value. For example:

=IMFACT("1+2i")
=IMFACT(COMPLEX(1,2))
=IMFACT(A2)

Quote a literal such as "1+2i"; do not enter a bare 1+2i expression. COMPLEX accepts an optional i/j suffix. The examples use comma separators inside multi-argument functions; local formula conventions can differ.

Worked examples

Put the indicated complex text in A2:A9, without the outer quotation marks; prefix an apostrophe if needed to preserve text. Enter =IMFACT(A2) in B2 and fill down. The table gives mathematical reference values rounded to nine decimal places.

Complex input (as formula literal) Corresponding Gnumeric formula Expected mathematical result (approximately)
A2: "0" =IMFACT(A2) 1.000000000
A3: "1" =IMFACT(A3) 1.000000000
A4: "3" =IMFACT(A4) 6.000000000
A5: "0.5" =IMFACT(A5) 0.886226925
A6: "-0.5" =IMFACT(A6) 1.772453851
A7: "1+i" =IMFACT(A7) 0.652965496 + 0.343065840i
A8: "1-i" =IMFACT(A8) 0.652965496 − 0.343065840i
A9: "1-2i" =IMFACT(A9) 0.112294242 − 0.323612886i

Use =IMREAL(B2) and =IMAGINARY(B2) to compare coefficients. A different i/j suffix or display precision does not by itself change the complex value.

Example: noninteger factorial and a Gamma cross-check

For z=1/2, =IMFACT("0.5") has expected value Γ(3/2)=√π/2 ≈ 0.886226925. For z=1+i the expected value is approximately 0.652965496+0.343065840i. These are continuous extensions of factorial, not counts of an integer number of objects.

For a nonzero input away from Gamma poles, z!=zΓ(z). Put 1+i in A2, =IMFACT(A2) in B2, and =IMPRODUCT(A2,IMGAMMA(A2)) in C2. Then =IMABS(IMSUB(B2,C2)) in D2 should be near zero.

Do not use that product cross-check at zero: it forms 0×Γ(0), which is undefined, although IMFACT’s mathematical target 0! is 1. The safer general identity is z!=Γ(z+1), away from factorial poles at −1, −2, and so on. Large arguments and calculations near poles need extra care with overflow and cancellation.

Input errors and practical checks

The 1.12.62 complex parser maps malformed complex text to #NUM!, whereas the web manual’s generic invalid-input note says #VALUE!. The pinned parser rejects other unsupported types with #VALUE!; coercion before that helper can affect blanks or Booleans. Use an explicit complex string or COMPLEX result when diagnosing an input problem.

Invalid numerical outputs are mapped to a numeric error by the release implementation. Avoid evaluating at the mathematical poles described above; an error token is not a substitute for checking the model’s domain.

Official sources