IMTAN Function (OpenOffice Calc)
Evaluate complex tangent in Apache OpenOffice, with double-angle formulas, imaginary-axis checks and explicit pole limitations.
Verification status: Eight reference formulas and 5 diagnostic cases were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, using generated native-ODF input and GUI hard recalculation. Saved formula identities and typed results were checked. How formula examples are checked
Quick answer: =IMTAN("1+i") returned 0.271752585319512+1.08392332733869i in the tested Apache OpenOffice 4.1.16 build.
Availability and version history
- Introduced: First release not established; the pinned 4.1.16 source confirms current-release presence.
- 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 from generated native-ODF input in 4.1.16 on Linux x86-64, Build 9816. Source and independent reference calculations were also checked.
What IMTAN returns
IMTAN returns complex tangent, mathematically sin(z)/cos(z) where cosine is nonzero. It does not return an inverse tangent angle. The imaginary unit can use the parser’s lowercase i or j convention. For z=a+bi, the independent component formula is tan(a+bi)=[sin(2a)+i sinh(2b)]/[cos(2a)+cosh(2b)]. Release entry.
Syntax and arguments
=IMTAN(ComplexNumber)
Exactly one complex-number argument is required. The add-in parses pure real forms and complex strings with lowercase i or j. Its strict parser rejects nonempty malformed text and empty strings. The trigonometric angles in the component formulas are in radians, not degrees.
Reproducible examples
The native column records the saved 4.1.16 results. The native strings are retained exactly. Independent component references are rounded to twelve decimal places, with rounded negative zero shown as zero. A tiny stored residual can therefore appear in the native string beside a reference component rounded to zero. Every successful result below is string-typed, including pure real-looking outputs.
| Formula | Native 4.1.16 string | Independent (real, imaginary) reference |
|---|---|---|
=IMTAN("1+i") |
0.271752585319512+1.08392332733869i |
(0.27175258532, 1.083923327339) |
=IMTAN("1-i") |
0.271752585319512-1.08392332733869i |
(0.27175258532, -1.083923327339) |
=IMTAN("-1+i") |
-0.271752585319512+1.08392332733869i |
(-0.27175258532, 1.083923327339) |
=IMTAN("-1-i") |
-0.271752585319512-1.08392332733869i |
(-0.27175258532, -1.083923327339) |
=IMTAN("1") |
1.5574077246549 |
(1.557407724655, 0) |
=IMTAN("i") |
0.761594155955765i |
(0, 0.761594155956) |
=IMTAN("0.5+0.25i") |
0.504500702698564+0.312420692502589i |
(0.504500702699, 0.312420692503) |
=IMTAN("2+0.5i") |
-0.850878121144938+1.32128658377119i |
(-0.850878121145, 1.321286583771) |
Practical worksheet
For 1+i, the components are about 0.271752585320 and +1.083923327339. For i alone, tan(i)=i tanh(1), a purely imaginary value with magnitude less than 1. A real input 1 reduces to ordinary tan(1) with a zero imaginary component.
For a worksheet, place a validated complex value in A2 and use =IMTAN(A2). This is an illustrative layout for the tested literal argument. Keeping real and imaginary measurements separately can make unit, sign and parsing mistakes easier to detect.
Advanced interpretation and checks
Tangent is odd and respects conjugation. Where all quantities are defined, tan(z)cot(z)=1. Its period along the real direction is π: tan(z+π)=tan(z). Finite stored approximations to π and rounding can create small residual differences in a worksheet check.
The component formula uses doubled arguments. The pinned implementation checks its trigonometric argument range before evaluation and returns through a finite-component formatter. Those implementation guards are separate from the mathematical locations of poles.
Boundaries and troubleshooting
Zero is valid and returns 0. Mathematical poles occur on the real axis at π/2+kπ. Near a pole, a very small input error can become a large output error. The table does not claim that a stored approximation to a pole must produce an error, nor that every huge complex input is numerically stable.
These additional formulas were recalculated through the same generated-ODF path. Error displays are retained as errors, even when an ODS numeric attribute stores zero.
| Formula | Observed result or error |
|---|---|
=IMTAN("0") |
0 |
=IMTAN("abc") |
Err:502 |
=IMTAN("") |
Err:502 |
=IMTAN("1+j") |
0.271752585319512+1.08392332733869j |
=IMTAN("1";2) |
Err:504 |
Other spreadsheet implementations
The IMTAN guide for LibreOffice Calc 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
- Function-specific release entry
- Complex algorithm or collection helper
- Strict complex-string parser
- Finite-output string formatter
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. The application reported “Not all attributes could be read” on loading the generated input. All tested identities and input text survived, but preservation of every style attribute was not established. Native evidence covers the eight reference formulas and listed diagnostics only; it does not establish XLSX-import or manual-entry behavior. Other explanatory compositions are independent mathematical checks; other releases, locales and extreme-value behavior were not established by this run.