Contact

IMAGINARY Function (OpenOffice Calc)

Engineering Intermediate OpenOffice Calc

Extract imaginary coefficients in Apache OpenOffice with IMAGINARY, including unit coefficients, signs and strict malformed-text errors.

Verification status: Eight reference formulas and 5 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: =IMAGINARY("-3-4i") returned -4 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 IMAGINARY returns

IMAGINARY returns the numeric coefficient b from a+bi. The answer is b, not the string bi and not an angle. A negative coefficient preserves its sign rather than becoming an absolute magnitude. Release entry.

Syntax and arguments

=IMAGINARY(ComplexNumber)

Exactly one parsed complex value is required. Lowercase i and j denote the imaginary unit. Pure imaginary forms i and −i have coefficients +1 and −1, while a pure real input has coefficient zero. Malformed and empty strings are rejected.

Reproducible examples

The native column records the saved 4.1.16 results. Text-returning conversion strings are retained exactly, including leading zeroes and uppercase hexadecimal letters. OCT2DEC, IMREAL and IMAGINARY return numeric values. These integer and quarter-unit references agree exactly with the saved results; errors are checked by display rather than interpreted from a numeric zero cache.

Formula Native 4.1.16 result Independent reference
=IMAGINARY("3+4i") 4 4
=IMAGINARY("3-4i") -4 -4
=IMAGINARY("-3+4i") 4 4
=IMAGINARY("-3-4i") -4 -4
=IMAGINARY("5") 0 0
=IMAGINARY("i") 1 1
=IMAGINARY("-i") -1 -1
=IMAGINARY("0.5+0.25i") 0.25 0.25

Practical worksheet

=IMAGINARY("3+4i") returns 4, and =IMAGINARY("3-4i") returns −4. Changing the real component from +3 to −3 does not change the imaginary coefficient. For i alone the answer is 1, not a missing-value error.

A worksheet can use =IMAGINARY(A2) for a validated complex string. Keep the extracted number’s meaning clear: it is a component with the same underlying units as the real component, not automatically a phase angle in radians.

Advanced interpretation and checks

Imaginary-part extraction is additive, but for a product Im(zw)=Re(z)Im(w)+Im(z)Re(w). In (3+4i)(1−2i), the imaginary coefficient is 3×(−2)+4×1=−2. Multiplying just 4 and −2 would be incorrect.

Conjugation reverses the imaginary coefficient, while leaving the real component unchanged. For a pure real value, the imaginary coefficient is zero. Both components are needed for magnitude and phase; the sign of this coefficient alone cannot identify a complete quadrant.

The return value is numeric, so ordinary arithmetic can use the coefficient directly. Reconstruct a complex value explicitly when combining it with a real component again.

Boundaries and troubleshooting

The lowercase j diagnostic preserves the same numeric coefficient as i. A numeric argument 5 has imaginary component zero. Invalid strings, empty strings and unsupported uppercase I produce errors. A successful zero and a failed parse must remain distinct in downstream calculations.

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
=IMAGINARY("abc") Err:502
=IMAGINARY("") Err:502
=IMAGINARY(5) 0
=IMAGINARY("3+4j") 4
=IMAGINARY("3+4I") Err:502

Other spreadsheet implementations

The IMAGINARY 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

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.