IMLN Function (OpenOffice Calc)
Use Apache OpenOffice IMLN for principal complex logarithms, with magnitude and radian-phase components and explicit zero errors.
Verification status: Eight reference formulas and 3 diagnostic cases were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, using XLSX import and GUI hard recalculation. Saved formula identities and typed results were checked. How formula examples are checked
Quick answer: =IMLN("3+4i") returned 1.6094379124341+0.927295218001612i in the tested Apache OpenOffice 4.1.16 build.
Availability and version history
- Introduced: First release not established; documented by OpenOffice.org 3.3.
- Supported in: Apache OpenOffice 4.1.16; this identifies a verified release, not a final supported version.
- Scope: Desktop Calc with its Analysis add-in, English function names and semicolon-separated formulas.
- Checked: October 14, 2026. Eight reference formulas and the listed diagnostics were recalculated after XLSX import in 4.1.16 on Linux x86-64, Build 9816. Source and independent reference calculations were also checked.
What IMLN returns
IMLN returns the principal natural logarithm of a nonzero complex number. Its real component is ln|z| and its imaginary component is the selected phase in radians. It does not take the natural logarithm of the real and imaginary components separately. Release entry.
Syntax and arguments
=IMLN(ComplexNumber)
One complex-number argument is required, and zero is rejected. Lowercase i/j forms and nonzero pure real forms are parsed. Invalid text is an error. Negative real values are valid complex logarithm inputs even though the ordinary real LN function has a different domain.
Reproducible examples
The native column records the saved 4.1.16 results. The native strings are retained exactly. Independent component references are rounded to twelve decimal places, with rounded negative zero shown as zero. A tiny stored residual can therefore appear in the native string beside a reference component rounded to zero. Every successful result below is string-typed, including pure real-looking outputs.
| Formula | Native 4.1.16 string | Independent (real, imaginary) reference |
|---|---|---|
=IMLN("3+4i") |
1.6094379124341+0.927295218001612i |
(1.609437912434, 0.927295218002) |
=IMLN("3-4i") |
1.6094379124341-0.927295218001612i |
(1.609437912434, -0.927295218002) |
=IMLN("-3+4i") |
1.6094379124341+2.21429743558818i |
(1.609437912434, 2.214297435588) |
=IMLN("-3-4i") |
1.6094379124341-2.21429743558818i |
(1.609437912434, -2.214297435588) |
=IMLN("1") |
0 |
(0, 0) |
=IMLN("i") |
1.5707963267949i |
(0, 1.570796326795) |
=IMLN("-1") |
3.14159265358979i |
(0, 3.14159265359) |
=IMLN("0.5+0.25i") |
-0.58157540490284+0.463647609000806i |
(-0.581575404903, 0.463647609001) |
Practical worksheet
For z=3+4i, |z|=5 and arg(z)≈0.927295218002. Thus =IMLN("3+4i") has components approximately 1.609437912434 and 0.927295218002. The first is ln(5), not ln(3).
A worksheet can store the complex value in A2 and use =IMLN(A2). Label the returned imaginary component as a radian phase if it is extracted for reporting. A negative real component in the logarithm simply means the input magnitude is less than 1.
Advanced interpretation and checks
All logarithms of nonzero z differ by integer multiples of 2Ï€i. This function chooses a principal representative. The helper obtains phase using acos(real/|z|), then negates it when the imaginary input is strictly negative. The negative real axis with zero imaginary part gives +Ï€.
Consequently ln(−1)=iπ on this branch, while ln(i)=iπ/2. The negative-zero-looking -1-0i diagnostic records the actual branch convention.
The usual real identity ln(zw)=ln(z)+ln(w) may differ by 2πi after principal-branch selection. For z=w=−1, ln(zw)=ln(1)=0 while the two principal logs sum to 2πi. Do not simplify away that branch difference.
Boundaries and troubleshooting
Zero has no finite complex logarithm and is explicitly rejected. A malformed string is also rejected rather than converted to zero. These errors must remain errors in downstream arithmetic.
Near the negative real axis, changing a tiny imaginary sign can move the phase by almost 2Ï€. That discontinuity is inherent to the chosen branch, not necessarily a large physical change. Extreme magnitudes and very small components can also expose finite-precision limits beyond the examples.
These additional formulas were recalculated through the same import path. Error displays are retained as errors, even when an ODS numeric attribute stores zero.
| Formula | Observed result or error |
|---|---|
=IMLN("0") |
Err:502 |
=IMLN("abc") |
Err:502 |
=IMLN("-1-0i") |
3.14159265358979i |
Other spreadsheet implementations
The IMLN guide for Calligra Sheets documents that product’s own syntax and tested behavior. A shared function name does not guarantee the same argument conversion, text parsing, branch or precision rules.
Official evidence and checking scope
- Function-specific release entry
- Complex algorithm or collection helper
- Strict complex-string parser
- Finite-output string formatter
The saved ODS retained every tested formula identity. A deliberately stale SUM cache changed from 999999 to 3, and an uncached SUM returned 7 after hard recalculation. Native evidence covers the eight reference formulas and listed diagnostics only. Other explanatory compositions are independent mathematical checks; other releases, locales and extreme-value behavior were not established by this run.