Contact

IMTANH Function (Gnumeric)

Engineering Intermediate Gnumeric

Learn about the IMTANH function in Gnumeric, with usage notes and documentation links.

Verification status: See the evidence and test scope described in this guide. 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.

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. Documentation/source check; no new native test in Gnumeric 1.12.62.

What does IMTANH do?

IMTANH evaluates complex hyperbolic tangent for one complex-number argument. Compute the hyperbolic tangent of a complex argument; useful for ratios of hyperbolic functions and bounded responses for large positive real inputs. It is not an ordinary real-only function, and its result may have both real and imaginary components. M1, S1.

For z = x + yi, the complex unit i satisfies i² = −1. The primary mathematical identity is tanh(z) = sinh(z)/cosh(z). Complex arithmetic is important even if the source data begin as ordinary real values.

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 Gnumeric syntax

=IMTANH(z)
Parameter Position Type and meaning Required Default
z 1 A complex number, commonly represented by a valid string such as "1+2i" or produced with Gnumeric’s COMPLEX(x,y) Yes No optional argument or default

Use the spelling IMTANH. The documented function accepts one argument, not an arbitrary list or separate real,imag parameters. Create a value with =COMPLEX(1,2) first if your inputs are coefficients. COMPLEX(x,y,i) also documents a third optional suffix of "i" or "j", defaulting to "i". An inspected upstream helper accepts numeric values and complex strings, but no release-specific claims about coercion of booleans or formatting are made here. M1, S1.

The formulas below use commas and decimal points in the English-language notation used in the Gnumeric manual and examples. Your configured locale may use different argument separators or decimal conventions. That locale behavior has not been independently exercised, so consult the formula editor on the installed program before copying across locales.

Quick examples

=IMTANH("1+2i")
=IMTANH(COMPLEX(1,2))
=IMTANH("3+4i")

The two first expressions represent the same mathematical input. Expected numeric coefficients are listed below, but the exact number of digits, i/j suffix and error display are not claimed as tested Gnumeric outputs.

Reproducible worksheet exercise

In an empty sheet, enter each expression in column A and enter the corresponding IMTANH formula into column B. The first column deliberately uses COMPLEX(real,imag) to remove ambiguity from hand-typed complex-number syntax.

Cell Input (enter as formula in A) Formula in B Mathematical expected value (rounded to 8 decimals)
A2 =COMPLEX(0,0) =IMTANH(A2) 0.00000000
A3 =COMPLEX(1,0) =IMTANH(A3) 0.76159416
A4 =COMPLEX(0,1) =IMTANH(A4) 1.55740772i
A5 =COMPLEX(1,2) =IMTANH(A5) 1.16673626-0.24345820i
A6 =COMPLEX(-0.5,0.25) =IMTANH(A6) -0.48548728+0.19805545i
A7 =COMPLEX(3,4) =IMTANH(A7) 1.00070954+0.00490826i
A8 =COMPLEX(0.5,-0.75) =IMTANH(A8) 0.72821180-0.61809639i

All finite expected coefficients above were calculated independently using the mathematical complex operations in Python 3’s cmath module on October 13, 2026. No native Gnumeric execution was conducted. Small differences in rounded displays are expected across numerical libraries; compare numerical real/imaginary components rather than literal complex text.

For a direct text-input check, enter "1+2i" as a quoted argument in the function formula. For a j-suffix check, construct the input with =COMPLEX(1,2,"j"). The inspected upstream code carries a parsed suffix into the complex output representation, but the exact 1.12.62 application display has not been tested. M1, S1.

Why the mathematics works

What happens to the imaginary part?

For z = x + yi, tanh(z) = [sinh(2x) + i sin(2y)] / [cosh(2x) + cos(2y)], away from denominator zeros. Unlike real tanh, the complex function can have poles. Do not treat its real or imaginary parts as a probability, percentage, or something necessarily confined to −1 through 1. A value with a large imaginary component can be a perfectly valid mathematical output.

For real z, tanh(z) is bounded between −1 and 1; for imaginary z = yi, tanh(yi) = i tan(y) wherever defined. For large positive real parts it tends toward 1, and for large negative real parts it tends toward −1. These are mathematical properties, not claims that a particular spreadsheet will preserve every extreme without overflow.

How this differs from IMTAN

IMTAN evaluates tan(z) = sin(z)/cos(z), while IMTANH evaluates sinh(z)/cosh(z). Swapping IMTAN for IMTANH changes the equation. The identity tanh(iz) = i tan(z) connects them mathematically, but only with correct complex arguments and outside singularities.

Detailed application and advanced validation

Worked ratio check: Put =COMPLEX(1,2) in A2, =IMTANH(A2) in B2 and =IMDIV(IMSINH(A2),IMCOSH(A2)) in C2. B2 and C2 should be close in their real and imaginary coefficients. This is an internal spreadsheet cross-check recipe based on Gnumeric’s documented one-argument functions; numerical results in the examples are independently calculated, not observed from Gnumeric.

Signal interpretation: If a dimensionless transfer-variable z = 0.5 − 0.75i is supplied in A3, enter =IMTANH(A3) in B3 to represent tanh(z), and use =IMABS(B3) to compute its magnitude. Do not apply the real-only tanh bound to that complex magnitude.

For a second, structurally different validation in the worksheet, use the following documented-function identity:

=IMDIV(IMSINH(A2),IMCOSH(A2))

Expected: agrees with IMTANH(A2) away from poles, within floating-point tolerance. This is an algebraic check rather than a second implementation of the same source code. Where the comparison uses division, it is valid only away from mathematical poles. If a worksheet displays a string, first extract real and imaginary components with IMREAL/IMAGINARY instead of attempting unsupported direct arithmetic on arbitrary complex text.

An alternative expression for the same result is:

=IMDIV(IMSINH(A2),IMCOSH(A2))

This is intentionally presented as a mathematical cross-check for a future native reviewer, not a guaranteed drop-in replacement under every locale or Gnumeric build.

Errors, limits, and troubleshooting

Symptom / condition What is supported by the evidence Practical resolution
Invalid complex text, e.g. "not-complex" The published manual says #VALUE!, while inspected 1.12.62 source routes malformed complex strings toward #NUM!; the exact 1.12.62 runtime error is unverified. Enter a valid complex value like "1+2i", or use =COMPLEX(1,2); note the error actually observed during native QA.
Value type not accepted as a complex number The upstream parser distinguishes numeric, string, empty and unsupported types. It is not enough to assume another spreadsheet’s coercion rules. Check the cell’s type and use Gnumeric’s formula editor; do not assume that booleans behave like numeric inputs.
A blank input Official 1.12.62 source treats an empty value as zero, but output can depend on the function’s mathematical domain; no installed-version check was performed. Prefer explicit inputs to blanks for auditable worksheets; test blank handling in the actual installed version.
Output text seems not to equal expected text Complex formatting and rounding can change displayed trailing zeros and suffixes. Compare coefficients with IMREAL and IMAGINARY, using a justified numeric tolerance.
Unexpected huge, undefined or inaccurate values Mathematical singularity/overflow/cancellation may occur independently of software correctness. Check the input magnitude and mathematical domain; compare independent components. Avoid asserting a specific error code without a native test.
Formula not accepted after copying from another locale The tutorial shows English notation; locale-specific separators/decimal marks are not certified. Re-enter using the Gnumeric Function Browser or local formula settings.
Formula name seems missing The public catalogue documents registration, but a catalogue entry does not certify the particular installed version, distribution plug-ins or edition. Confirm installed Gnumeric version and the available function list; do not infer runtime support solely from the website.

Numerical precision and mathematical domain

The mathematical poles of tanh(z) lie at z = i(π/2 + kπ) for integers k. Near these values tiny changes in input can produce very large changes in output. Avoid inferring that =IMTANH(COMPLEX(0,PI()/2)) has a stable finite result or that a particular error token is guaranteed; the exact runtime outcome at or near a pole was not executed.

The official 1.12.62 code returns #NUM! if its internally computed complex result is invalid, while its published manual’s generic invalid-input note says #VALUE!. Do not interpret the catalogue’s Exhaustive test label as evidence for any specific worksheet example or on every platform.

Compatibility, version and platform boundaries

  • Software studied: Gnumeric desktop spreadsheet. The Gnumeric team announced version 1.12.62 in September 2026; source packages and platform-specific builds can differ. This manuscript is not certified against a locally installed copy on Linux, Windows or macOS. R1.

  • Upstream catalogue: IMTANH appears as Complete / Exhaustive in the currently accessible official catalogue. These labels summarize the upstream catalogue; they neither identify a specific package build nor replace native testing. C1.

  • Excel and other spreadsheets: The inspected source’s function-help block includes an Excel-compatibility statement, whereas the published web manual does not explicitly certify each of these functions as Excel compatible. Therefore, the source claim is labelled release-source documentation, not proven cross-product byte-for-byte equivalence. Excel/LibreOffice behavior was not used to deduce Gnumeric outputs. S1, M1.

  • Implementation evidence: The official manual confirms the function and syntax, the catalogue assigns a testing classification, and the inspected 1.12.62 source evaluates the expected complex operation. None alone means this exact workbook example ran in the 1.12.62 release.

Official references and evidence boundary

ID Checked Official evidence and supported claim
M1 2026-10-13 Gnumeric user manual, Complex category, section IMTANH: syntax IMTANH(z), one complex argument, named behavior, and manual’s invalid-input note.
C1 2026-10-13 Gnumeric official function catalogue: IMTANH listed as Complete / Exhaustive (classification of upstream support/test coverage, not this guide’s runtime test).
S1 Official Gnumeric 1.12.62 source Exact release complex callbacks and shared parser inspected after archive checksum verification; no native execution.
R1 2026-10-13 Gnumeric team’s 1.12.62 announcement (September 2026) notes a 1.12.62 release and improvements to complex-function Excel compatibility, without claiming these exact examples were executed.

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.