Contact

IMARGUMENT Function (OpenOffice Calc)

Engineering Intermediate OpenOffice Calc

Calculate complex phase in Apache OpenOffice, with all four quadrants, radian units, zero-input errors and an explicit negative-axis convention.

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: =IMARGUMENT("3+4i") returned 0.927295218002 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 IMARGUMENT returns

IMARGUMENT returns a parsed complex number’s phase angle in radians. It records direction in the complex plane, not magnitude. The zero complex number has no defined direction and is rejected by the inspected implementation. Release entry.

Syntax and arguments

=IMARGUMENT(ComplexNumber)

Exactly one complex-number argument is required. For ordinary nonzero a+bi, the result lies on the principal phase interval from −π through π under the helper’s sign convention. Lowercase i and j suffixes are recognized by the parser. Use a consistent angle unit in later trigonometric formulas.

Reproducible examples

The native column records the saved 4.1.16 results. Ordinary numeric values are rounded to twelve decimal places, with scientific notation for tiny values. Stored values and display text were inspected separately; a twelve-decimal cell display can hide a tiny nonzero number.

Formula Native 4.1.16 result Independent reference
=IMARGUMENT("3+4i") 0.927295218002 0.927295218002
=IMARGUMENT("3-4i") -0.927295218002 -0.927295218002
=IMARGUMENT("-3+4i") 2.214297435588 2.214297435588
=IMARGUMENT("-3-4i") -2.214297435588 -2.214297435588
=IMARGUMENT("1") 0 0
=IMARGUMENT("i") 1.570796326795 1.570796326795
=IMARGUMENT("-i") -1.570796326795 -1.570796326795
=IMARGUMENT("-1") 3.14159265359 3.14159265359

Practical worksheet

=IMARGUMENT("3+4i") gives approximately 0.927295218002 radians, about 53.13°. For −3+4i the angle is approximately 2.214297435588 radians, correctly identifying the second quadrant. Computing ATAN(4/−3) alone would miss that quadrant.

For a degree-based report, multiply the returned radian angle by 180/PI(). Keep the radian value for functions expecting radians; converting to degrees and then using it unchanged inside a radian trigonometric function changes the calculation.

Advanced interpretation and checks

The implementation calculates acos(real/|z|) and negates the angle when the imaginary component is strictly negative. This yields the four-quadrant behavior shown in the table. On the negative real axis with zero imaginary part, the nonnegative sign branch returns +Ï€.

The string -1-0i is a useful boundary observation: a negative-zero-looking imaginary component is not necessarily treated as a strictly negative number by the comparison. Retain the observed output rather than assuming every atan2-style signed-zero convention applies.

For nonzero factors, product phases add modulo 2Ï€. A principal result can jump at the negative real axis even when the underlying complex value changes smoothly. Unwrapping a sequence of phases is a separate operation that this function does not perform.

Boundaries and troubleshooting

Zero is rejected because no phase angle is defined. Do not replace that error with zero radians unless the surrounding model explicitly defines such a convention; zero radians ordinarily denotes the positive real direction.

Invalid complex text is also rejected. Near the negative real axis, a small change in the sign of the imaginary component can shift the displayed principal angle by nearly a full turn. That branch discontinuity is different from a large physical change in magnitude.

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
=IMARGUMENT("0") Err:502
=IMARGUMENT("abc") Err:502
=IMARGUMENT("-1-0i") 3.14159265359

Other spreadsheet implementations

The IMARGUMENT 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.