IMARCTAN Function in Gnumeric: Syntax, Examples and Branch Cuts
Calculate the principal complex arctangent in Gnumeric and check imaginary-axis branch behavior.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =IMARCTAN("1+2i") finds the principal complex arctangent, approximately 1.338972522+0.402359478i.
Availability and version history
- Introduced: 1.1.6, according to the official release history. This was a development-series release.
- 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 IMARCTAN does
IMARCTAN returns the principal complex inverse of tangent. It operates on the whole complex value, not by applying the real inverse separately to each coefficient. The forward relation is tan(w)=z; selecting one inverse branch is necessary because the forward function is not one-to-one. Function reference.
Syntax and inputs
=IMARCTAN(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:
=IMARCTAN("1+2i")
=IMARCTAN(COMPLEX(1,2))
=IMARCTAN(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
Enter each column-A formula in the stated row, then enter its column-B formula. Results are mathematical reference values rounded to nine decimal places. Any residual column measures the reference calculation’s forward reconstruction.
| Input cell | Formula to enter in A | Formula to enter in B | Independently computed principal result |
|---|---|---|---|
| A2 | =COMPLEX(0,0) |
=IMARCTAN(A2) |
0.000000000 |
| A3 | =COMPLEX(0.5,0) |
=IMARCTAN(A3) |
0.463647609 |
| A4 | =COMPLEX(1,2) |
=IMARCTAN(A4) |
1.338972522+0.402359478i |
| A5 | =COMPLEX(2,-1) |
=IMARCTAN(A5) |
1.178097245−0.173286795i |
| A6 | =COMPLEX(-0.5,0.25) |
=IMARCTAN(A6) |
-0.484254490+0.200586618i |
| A7 | =COMPLEX(3,4) |
=IMARCTAN(A7) |
1.448306995+0.158997192i |
| A8 | =COMPLEX(0,0.5) |
=IMARCTAN(A8) |
0.549306144i |
| A9 | =COMPLEX(0.5,-0.75) |
=IMARCTAN(A9) |
0.692724188−0.590213500i |
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.
Principal branch and sensitive inputs
The imaginary-axis rays below −i and above +i are branch cuts. The logarithmic factors 1±iz vanish at z=±i, and the inverse can become large nearby. For a real input, the mathematical arctangent remains real. Documented branch behavior.
Compare COMPLEX(0.001,1.001) and COMPLEX(-0.001,1.001) on opposite sides of the same cut. Compare real and imaginary coefficients, not just formatted strings. Exact-cut signed-zero conventions and extreme-input behavior need checking in your installed version.
The forward check IMTAN(IMARCTAN(z))≈z is useful for finite nonsingular inputs. Reversing that composition need not recover an arbitrary original argument: the inverse returns the principal branch.
Advanced example: reconstruct a modeled response
For a response T=tan(w), IMARCTAN(T) estimates a principal w. Because tan(w+Ï€k)=tan(w), a sequence of measurements may require branch unwrapping. Select the continuous solution justified by the model instead of treating each principal result as unique.
Use A4’s 1+2i sample from the table. In C4 enter =IMTAN(B4) to reconstruct the input, and in D4 enter =IMABS(IMSUB(C4,A4)) for the residual. The independent reference reconstruction is within 1e−12 of the input; your numerical tolerance should reflect the model and input scale.
=IMTAN(IMARCTAN(A4))
=IMABS(IMSUB(IMTAN(IMARCTAN(A4)),A4))
A second mathematical check
The identity atan(z)=asin(z/sqrt(1+z²)) can provide a cross-check only with compatible branches and a nonzero denominator. For A4’s sample:
=IMARCSIN(IMDIV(A4,IMSQRT(IMSUM("1",IMPOWER(A4,"2")))))
Use the direct IMTAN reconstruction as the primary check. Algebraic rearrangements across a cut can select a different inverse branch.
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.
Near the branch points described above, a small input change can produce a large inverse change. The example rows avoid exact-cut ambiguity; retain that distinction when checking a branch-sensitive model.