IMLN Function (Gnumeric)
Learn the IMLN function in Gnumeric: Returns the natural logarithm of a complex number.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Evidence: Formula values are independently calculated mathematical expectations. Official Gnumeric 1.12.62 source and documentation were reviewed on 13 October 2026; no native execution or application screenshots were produced.
Availability and versions: The function appears in Gnumeric’s official Complex manual and function catalogue, which labels its implementation Complete with Exhaustive upstream tests. That is a catalogue classification, not an execution test of the examples on this page. Gnumeric announced version 1.12.62 with improvements to complex-function compatibility; the specific release binaries/source were not executed in this review. The project directs Linux/BSD users to distribution packages and says it does not currently distribute Windows binaries. Sources: function catalogue; 1.12.62 notes; download/platform policy (checked 2026-10-13).
Availability and version history
- Introduced: Documented by 1.12.62; original introduction not established.
- 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. Documentation/source check; no new native test in Gnumeric 1.12.62.
Quick answer
IMLN(z) returns the principal natural logarithm of a nonzero complex number, with magnitude and angle combined: ln(z) = ln(|z|) + i Arg(z). Thus =IMLN("3+4i") has independently calculated expectation 1.6094379124+0.9272952180i: the magnitude is 5, and the angle atan2(4,3) is 0.927295… radians. Gnumeric’s official manual documents the natural logarithm and principal imaginary range [-Ï€,+Ï€]. Complex manual, checked 2026-10-13.
Exact syntax and arguments
=IMLN(z)
z (required): one valid complex-number value, for example text "3+4i", a reference to such a cell, or a result of COMPLEX. No optional arguments or default values are documented. This is not the ordinary real-only LN function: a non-real input produces both real and imaginary coefficients. The log at zero is mathematically undefined. Gnumeric manual, checked 2026-10-13.
Reproducible formulas and expected results
| Formula | Independently calculated expectation | Interpretation |
|---|---|---|
=IMLN(A2) |
1.6094379124+0.9272952180i |
ln(5) plus phase |
=IMLN("1+i") |
0.3465735903+0.7853981634i |
Magnitude √2, angle π/4 |
=IMLN("2-1i") |
0.8047189562-0.4636476090i |
Negative phase |
=IMLN("0+1i") |
0+1.5707963268i |
Positive imaginary axis |
=IMLN(COMPLEX(B2,C2)) |
Same components as IMLN(A2) |
Build argument from numeric columns |
=IMLN("1+0i") |
0 (mathematical value) |
Principal log of 1 |
Text formatting and zero coefficients may differ from the values written here. The worksheet steps below allow component-based validation without asserting that a particular installation displays those precise strings.
Advanced example: phase and branch wrapping
Suppose A2 contains a sampled phasor 3+4i. Enter =IMREAL(IMLN(A2)) to obtain ln(|A2|) ≈ 1.6094379124 and =IMAGINARY(IMLN(A2)) to obtain the phase 0.9272952180 radians. The latter is in radians, not degrees; multiply the angle by 180/PI() if a degree display is required. This is useful when converting measured magnitude/phase pairs to a log-amplitude representation, subject to the data’s unit conventions.
Complex logarithms are multivalued: ln(z) = ln(|z|) + i(Arg(z) + 2πk) for integer k. The principal Gnumeric result chooses a single branch; the manual says its imaginary coefficient is bounded by ±π. Correction to a potentially misleading wording in the manual: other branches differ by multiples of 2π, not arbitrarily by 2 times a number of radians. For example, mathematical evaluation of IMLN(IMEXP("1+4i")) gives approximately 1-2.2831853072i on the principal branch, not 1+4i, because 4 radians lies above π. This result is independently calculated; the nested Gnumeric formula was not executed.
Related pages: IMEXP, IMLOG2, IMLOG10, and IMARGUMENT. Gnumeric manual, reviewed 2026-10-13.
Zero and branch-cut limits: IMLN("0+0i") has no finite mathematical value. An argument on/near the negative real axis can jump from near +Ï€ to near -Ï€ when the imaginary sign changes, so phase unwrapping may be necessary before plotting time-series data. An exact runtime error token for zero was not checked.
Build a reproducible worksheet
Create a blank Gnumeric sheet. Enter these complex-number text literals without a leading = in column A. Use plain English-formatted samples with a period as decimal separator; inspect your locale’s input conventions before adapting them.
| Cell | Enter as text | Purpose |
|---|---|---|
| A2 | 3+4i |
Nonzero magnitude and positive phase |
| A3 | 1+i |
45° phase, useful for checking imaginary coefficient |
| A4 | 2-1i |
Negative imaginary coefficient |
| A5 | 0+1i |
Imaginary-axis input |
| A6 | 0+0i |
Zero, used only to discuss the domain and errors |
| B2 | 3 (numeric) |
Real component for a constructed input |
| C2 | 4 (numeric) |
Imaginary component for a constructed input |
Enter the article’s function formula in D2 and copy to rows 3–5 if desired. For a constructed input, enter =COMPLEX(B2,C2) in D7 and use the article’s function around D7. COMPLEX’s manual signature is COMPLEX(x,y,i) with the suffix defaulting to i. The comma shown follows the English-language Gnumeric manual; locales may change separators and decimal conventions. This article does not claim to have tested other locale syntaxes. Sources: COMPLEX documentation; locale documentation (checked 2026-10-13).
Errors, limitations, and troubleshooting
- Unparseable text: The online Gnumeric 1.12 manual says
#VALUE!for invalid complex input. The checksum-verified official 1.12.62 source returns#NUM!for malformed complex strings; other unsupported value types may yield#VALUE!. This resolves the release-source provenance question, but is not a native execution result. - Quoted numeric-looking strings: Ensure your input contains a valid complex representation (
"3+4i"or"2-1i"), not a stray unit, spreadsheet formula, or text with thousands separators. Thei/jconvention belongs inside the complex text; do not append it to an ordinaryLN/LOGresult. - Locale/import: Formula syntax and text parsing can vary with decimal separators. The one-argument function signature stays one argument, but nested
COMPLEX(B2,C2)uses a delimiter that your localized installation may represent differently. Test an imported worksheet rather than silently replacing commas with semicolons; consult Gnumeric locale documentation. - Precision and formatting: Calculated complex results are floating-point approximations; displayed digits, placement of
iorj, and very small residual coefficients can vary. For verification compare real and imaginary components numerically (e.g.IMREAL/IMAGINARY) rather than comparing raw strings. - Compatibility: The manual marks this function Excel compatible, but this is Gnumeric’s documented classification. It does not establish identical parsing, error codes, version support, formatting, or calculations in another spreadsheet. Confirm a workbook separately in each target product.
- Testing boundary: All expected values on this page were independently derived using Python’s standard
cmath/mathmodules and analytic identities. Native Gnumeric checks: 0. Errors described as unresolved are deliberately not disguised as tested results.
Claim-level official references (checked 2026-10-13)
- Gnumeric Complex manual — signature, purpose, input note, compatibility and principal branch where stated.
- Official function catalogue — IMLN: Complete / Exhaustive (upstream catalogue status, not observed execution).
- Gnumeric 1.12.62 release announcement — general complex-function compatibility improvements, not a claim of per-example native testing.
- Official Gnumeric 1.12.62 source archive — inspected complex callbacks and shared parser in plugins/fn-complex/functions.c; release archive checked against its official SHA-256 checksum.
- Gnumeric download policy and locale documentation — platform availability and locale caveats.
Native validation remains outstanding: exact displayed results, error cells, locale behavior and workbook round-trips have not been checked in a running Gnumeric installation.