IMCOTH Function (Gnumeric)
Learn about the IMCOTH function in Gnumeric, with usage notes and documentation links.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Gnumeric. How formula examples are checked
Evidence: Official documentation and exact Gnumeric 1.12.62 source were inspected. Numeric examples are independent calculations; native execution, locale behavior and workbook round-trips remain untested.
What IMCOTH calculates
IMCOTH evaluates the complex hyperbolic cotangent of a complex argument z. Its mathematical definition is coth(z) = cosh(z)/sinh(z) = 1/tanh(z). Hyperbolic cotangent is the ratio of hyperbolic cosine to hyperbolic sine. It is not the ordinary cotangent and is not simply the reciprocal of the real part of the hyperbolic tangent. This is a complex-number operation, not a substitution of individual real and imaginary coefficients. M1 S1
With z=x+iy, use complex cosh(z) and sinh(z). For a real positive z, coth(z)>1; for a purely imaginary input, coth(iy)=−i cot(y) away from poles.
Version-specific error distinction: The online 1.12 manual describes malformed complex inputs as
#VALUE!. The official 1.12.62 source instead returns#NUM!when parsing a malformed complex string; other unsupported value types can still return#VALUE!. Any#VALUE!expectations below are the manual’s older documented rule, not verified 1.12.62 output. No native error test was performed.
Exact syntax, argument order, accepted form, and defaults
=IMCOTH(z)
| Argument | Position | Type | Required | Default |
|---|---|---|---|---|
z |
1 | One valid complex number, commonly a complex string such as "1+2i", "2-j", a cell holding such a result, or COMPLEX(real,imaginary) |
Yes | None; no optional arguments |
The Gnumeric manual documents exactly one parameter named z for IMCOTH; a call like IMCOTH(real,imaginary) is not its documented syntax. Gnumeric’s COMPLEX(x,y,i) helper provides a complex number from real and imaginary coefficients, and its optional suffix is "i" or "j" (default "i"). That helper is documented by Gnumeric; it is not an assumption derived from another spreadsheet. M1
Use =IMCOTH("1+2i") for a direct literal, =IMCOTH(COMPLEX(1,2)) for coefficient-based entry, or put =COMPLEX(1,2) in A4 and use =IMCOTH(A4).
The examples use English-style numeric points and commas for the COMPLEX helper. Function separators and parsing/display of numbers can depend on installed Gnumeric locale. This guide does not certify every locale: when pasting formulas, use the application’s local formula editor and test any suffix- or decimal-specific differences rather than assuming the same notation is accepted in another configured language.
Quick start
=IMCOTH("1+2i")
=IMCOTH(COMPLEX(1,2))
=IMCOTH("2-j")
The two first formulas represent the same mathematical input. For z=1+2i, the independent expected result is approximately 0.8213297975+0.1713836129i. Displayed digits, i/j suffix, internal precision and any error token can differ from these independently computed values. A Gnumeric-native comparison remains to be performed.
Build a fully reproducible worksheet
In a new Gnumeric spreadsheet, label A1 Complex input and B1 IMCOTH result. Enter the COMPLEX formulas in column A and the specified function formulas in column B. Column B’s last column below gives mathematical expected output rounded to 8 decimals, not an observed Gnumeric display:
| Input cell | Enter this exact worksheet formula in A | Enter this in B | Independently calculated expected value |
|---|---|---|---|
| A2 | =COMPLEX(1,0) |
=IMCOTH(A2) |
1.31303529 |
| A3 | =COMPLEX(0,1) |
=IMCOTH(A3) |
-0.64209262i |
| A4 | =COMPLEX(1,2) |
=IMCOTH(A4) |
0.82132980+0.17138361i |
| A5 | =COMPLEX(-0.5,0.25) |
=IMCOTH(A5) |
-1.76589722−0.72040109i |
| A6 | =COMPLEX(3,4) |
=IMCOTH(A6) |
0.99926693−0.00490118i |
| A7 | =COMPLEX(0.5,-0.75) |
=IMCOTH(A7) |
0.79818415+0.67748799i |
| A8 | =COMPLEX(2,-1) |
=IMCOTH(A8) |
0.98432923+0.03279776i |
| A9 | =COMPLEX(0,0) |
=IMCOTH(A9) |
undefined (mathematical pole; native error not tested) |
Rows use =COMPLEX(real,imag) for reproducibility instead of depending on a hand-typed complex string being auto-converted. Zero-input row A9 is included as a domain test: this is a genuine mathematical pole, and no particular Gnumeric error code is asserted. Finite results were independently calculated with Python 3’s cmath on 2026-10-13. The calculations and residual checks are archived alongside this manuscript. Compare IMREAL and IMAGINARY coefficients to reasonable numeric tolerances rather than comparing literal output strings.
To exercise the documented alternative imaginary-unit suffix, enter =COMPLEX(1,2,"j") in a separate input cell and =IMCOTH(that_cell). The upstream parser/formatter carries an imaginary-unit choice, but exact formatting in the packaged 1.12.62 application has not been observed. M1 S1
Worked example: evaluate the function correctly
With z=1+2i, compute cosh(z)/sinh(z) using complex division. The independent mathematical result is coth(z) ≈ 0.8213297975+0.1713836129i. The direct mathematical identity is coth(z) = cosh(z)/sinh(z) = 1/tanh(z); the key step is evaluating the complex denominator and applying complex division. M1
A second input, z=2−i, yields approximately 0.9843292265+0.0327977555i. This shows that changing the sign of the imaginary coefficient can alter both parts of the output. For real inputs, the result may be purely real; that does not make IMCOTH a real-only function.
Validate the reciprocal identity
Set A4 to =COMPLEX(1,2). Compare the documented direct function with a mathematically equivalent formula:
=IMCOTH(A4)
=IMDIV(IMCOSH(A4),IMSINH(A4))
=IMPRODUCT(IMCOTH(A4),IMSINH(A4))
The quotient should match the direct hyperbolic cotangent away from zeros of sinh(z). The third formula should evaluate to ≈ IMCOSH(A4), within floating-point tolerance. This is an independent algebraic expectation and a suggestion for a future Gnumeric-native QA test, not proof that all three were executed here. Gnumeric documents the involved related functions in its Complex manual. M1
The complex hyperbolic identity coth²(z)−csch²(z)=1 holds wherever sinh(z)≠0. It is a useful independent algebraic QA cross-check. Apply it only where the denominator is not zero.
Advanced application: magnitude and mathematical consistency
Complex transfer ratios: a model may express a ratio of a hyperbolic cosine-like solution to a hyperbolic sine-like solution using coth(z). Set A4==COMPLEX(1,2); calculate B4==IMCOTH(A4) and check its modulus with =IMABS(B4) before using the ratio in downstream calculations.
Two independent checks: compare =IMCOTH(A4) to =IMDIV(IMCOSH(A4),IMSINH(A4)). Then calculate =IMSUB(IMPOWER(IMCOTH(A4),"2"),IMPOWER(IMCSCH(A4),"2")); away from poles this should be approximately 1.
Extract coefficients for dependable comparisons: use =IMREAL(B4) and =IMAGINARY(B4) where B4 contains a complex result. Gnumeric also documents IMABS(B4) for magnitude. A string representation with a suffix is not an ordinary decimal number; numerical equality should be tested component by component, with a tolerance supported by the engineering or scientific context. M1
Do not confuse hyperbolic with circular trigonometry. Ordinary sine/cosine are periodic along the real line, while hyperbolic sine/cosine have different growth and singularity properties in the complex plane. The identity used in this tutorial is specific to IMCOTH; switching to a similarly named circular or hyperbolic function changes the mathematical problem.
Domain, poles, precision, and stability
sinh(z)=0 at z=kπi for integer k. This includes z=0, which is a pole of coth; input close to a pole may produce very large magnitudes. For large positive real z, coth(z) tends toward 1.
Evaluate =IMABS(IMSINH(A4)) before interpreting an extreme output. A small denominator magnifies rounding errors; do not use a fixed tolerance without considering your model precision.
Complex floating-point calculations may show rounding, trailing-zero suppression, underflow, overflow or loss of precision. In particular, a formula evaluated with a finite floating approximation to π may produce a large numeric result instead of a mathematically exact pole. Near-singular evaluations are poor grounds for testing literal string equality. Runtime error behavior must be checked with the installed application.
Errors and troubleshooting (documentation vs observed behavior)
| Symptom or input | What the evidence supports | Troubleshooting action |
|---|---|---|
"not-complex" or another malformed complex string |
The official web manual generically states #VALUE!; inspected official 1.12.62 help says #NUM! for invalid z and calls value_get_as_complex. The official 1.12.62 parser also returns #NUM! for malformed strings; native display remains untested. |
Use a genuine complex value, preferably =COMPLEX(1,2); note the actual native error during required testing. |
| Blank cell or coercion from nonnumeric text/Boolean | The manual specifies a complex argument but does not certify every implicit conversion. The inspected current implementation parses/dispatches types rather than relying on another spreadsheet’s rules. | Enter explicit COMPLEX(real,imag) values and test blanks/type conversion natively; do not extrapolate from Excel or LibreOffice. |
| Zero or a mathematical pole | sinh(z)=0 at z=kπi for integer k. This includes z=0, which is a pole of coth; input close to a pole may produce very large magnitudes. For large positive real z, coth(z) tends toward 1. | Verify domain first. Do not assume any specific #DIV/0!, #NUM!, or #VALUE! label without a native Gnumeric check. |
| Huge/unexpectedly unstable result | A small reciprocal denominator can amplify input error. | Calculate the denominator magnitude and inspect proximity to a pole; examine the underlying model and choose precision appropriately. |
| A text-looking complex output fails a numeric operation | Complex values are represented or formatted with i/j, and plain arithmetic on a text representation may not match complex operations. |
Use IMREAL, IMAGINARY, IMABS, IMDIV, IMPRODUCT or another documented complex function instead of unvalidated text arithmetic. |
| Formula copied from another locale fails | The guide’s English numeric and argument punctuation may not match configured formula/decimal rules. | Use the Gnumeric formula editor and local convention; test suffix entry on that edition. |
| Formula not found in an installed version | An official catalogue entry is evidence of registration and project support, not proof of availability in an unknown local package or historical edition. | Verify installed Gnumeric version, function browser and plug-in setup; document any package differences. |
Manual-versus-source discrepancy matters: as of 2026-10-13, the public manual’s invalid-argument note uses #VALUE!, whereas source help in the inspected 1.12.62 branch uses #NUM! for invalid z and the implementation forwards a parser-specific standard error. The exact official 1.12.62 release source was inspected separately for this review. This guide intentionally does not invent native error observations. M1 S1
Version, platform, aliases and software compatibility
- Gnumeric-specific syntax: Official Complex manual documents
IMCOTH(z)as a one-argument complex function. M1 - Catalogue registration and implementation: The official public function catalogue currently classifies IMCOTH as Complete / Exhaustive. This is upstream implementation/test-suite metadata; no native Gnumeric execution was conducted for this guide. C1
- Release implementation: The exact official 1.12.62 callback parses one complex argument and computes the complex hyperbolic cotangent. Invalid complex results map to
#NUM!; this is source inspection, not observed application output. S1 - Release/platform: The Gnumeric team announced version 1.12.62 in September 2026 and generic improvements to complex-function Excel compatibility. This manuscript has not executed native Gnumeric binaries on Linux or any other platform, has not inspected package-specific builds, and makes no undocumented Windows/macOS release support promise. R1
- Excel, Sheets, LibreOffice and other programs: The inspected 1.12.62 function help contains an Excel-compatibility note, but the current web manual does not explicitly certify Excel compatibility for IMCOTH. The note is not a full behavioral comparison by version and locale. No other spreadsheet was used as evidence for Gnumeric calculations; cross-import and cross-product equivalence require separate testing. S1 M1
Related Gnumeric guides (canonical source links checked)
Official references and claim-level evidence (checked 2026-10-13)
| ID | Source | Exact supported claim and verification limit |
|---|---|---|
| M1 | Gnumeric Manual, Complex category | Lists IMCOTH, synopsis IMCOTH(z), required complex argument and generic invalid-input note; definitions and related functions as applicable. |
| C1 | Gnumeric official function catalogue | Lists IMCOTH as Complete / Exhaustive, referring to upstream classification rather than this tutorial’s runtime tests. |
| S1 | Official Gnumeric 1.12.62 source | Exact release complex callbacks and shared parser inspected after archive checksum verification; no native execution. |
| R1 | Official Gnumeric 1.12.62 announcement | Current version context, September 2026 release and general complex-compatibility improvements; does not establish this formula’s executed result. |
Evidence limitations
No native Gnumeric execution, application screenshots, locale tests or workbook round-trip checks were performed. Source review and independent calculations do not replace application-level testing.