IMARCCOS Function in Gnumeric: Syntax, Examples and Branch Cuts
Find the principal complex arccosine in Gnumeric, keeping both components and checking branch-sensitive results.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =IMARCCOS("1+2i") finds the principal complex arccosine, approximately 1.143717740-1.528570919i.
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 IMARCCOS does
IMARCCOS returns the principal complex inverse of cosine. It operates on the whole complex value, not by applying the real inverse separately to each coefficient. The forward relation is cos(w)=z; selecting one inverse branch is necessary because the forward function is not one-to-one. Function reference.
Syntax and inputs
=IMARCCOS(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:
=IMARCCOS("1+2i")
=IMARCCOS(COMPLEX(1,2))
=IMARCCOS(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) |
=IMARCCOS(A2) |
1.570796327 |
| A3 | =COMPLEX(0.5,0) |
=IMARCCOS(A3) |
1.047197551 |
| A4 | =COMPLEX(1,2) |
=IMARCCOS(A4) |
1.143717740−1.528570919i |
| A5 | =COMPLEX(2,-1) |
=IMARCCOS(A5) |
0.507356303+1.469351744i |
| A6 | =COMPLEX(-0.5,0.25) |
=IMARCCOS(A6) |
2.072405180−0.281396056i |
| A7 | =COMPLEX(3,4) |
=IMARCCOS(A7) |
0.936812461−2.305509031i |
| A8 | =COMPLEX(0,0.5) |
=IMARCCOS(A8) |
1.570796327−0.481211825i |
| A9 | =COMPLEX(0.5,-0.75) |
=IMARCCOS(A9) |
1.172518453+0.743320426i |
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 real-axis rays below −1 and above +1 are branch cuts. The branch points are ±1, where the inverse is highly sensitive. Real inputs inside [−1,1] have real arccosines; larger magnitudes can produce a nonzero imaginary coefficient. Documented branch behavior.
Compare COMPLEX(1,0.000001) and COMPLEX(1,-0.000001) near +1. 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 IMCOS(IMARCCOS(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 R=cos(kL), IMARCCOS(R) supplies a principal candidate for kL. Cosine is periodic and even, so the alternatives ±w+2πk need the model’s physical or continuity constraints. Do not discard the imaginary coefficient if the model includes attenuation.
Use A4’s 1+2i sample from the table. In C4 enter =IMCOS(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.
=IMCOS(IMARCCOS(A4))
=IMABS(IMSUB(IMCOS(IMARCCOS(A4)),A4))
A second mathematical check
The relation acos(z)=π/2−asin(z) provides a second check on compatible principal branches. For A4’s sample:
=IMSUB("1.5707963267948966",IMARCSIN(A4))
Use the direct IMCOS 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.