Contact

IMTAN in ONLYOFFICE: Complex tangent with Examples

Engineering Intermediate ONLYOFFICE Spreadsheet Editor

Learn IMTAN in ONLYOFFICE Spreadsheet Editor: exact syntax, reproducible complex-number examples, independently checked outputs, troubleshooting and compatibility limits.

Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in ONLYOFFICE Spreadsheet Editor. How formula examples are checked

Quick answer: IMTAN returns the tangent of a complex number. The ONLYOFFICE official IMTAN reference documents the exact English call =IMTAN(inumber), with one required complex-number argument. This manuscript provides numerical mathematical expectations, not observed outputs from either ONLYOFFICE Desktop or the web editor.

Verification: The numeric examples are independent mathematical expectations. No native ONLYOFFICE Desktop or web execution was performed; formatting, localized entry and release-specific support remain unverified.

Syntax, order, required types and defaults

=IMTAN(inumber)
Position Argument Required? Accepted form according to vendor Default
1 inumber Yes A complex number written in x+yi or x+yj form None

The vendor specifically calls this an engineering function and documents only inumber; it does not list optional parameters, a default value or a multi-argument form (IMTAN vendor reference). inumber can be prepared from two numbers using the separate officially documented COMPLEX(real_num, i_num, [suffix]) function. COMPLEX accepts lowercase "i" or "j" and defaults to "i" if its optional suffix is omitted; this default belongs to COMPLEX, not to IMTAN.

Formula conventions: ONLYOFFICE’s Insert functions manual says formulas begin with = and argument lists use commas in its documented interface. The samples below use English function names, decimal points and comma separators. The manual does not establish that every localized deployment uses identical separators or translated names; check your installed application’s regional settings. Radians are used in these mathematical trigonometric identities; no documented degrees option exists for IMTAN.

What IMTAN computes, including complex parts

Write the input as z = a + bi, where a and b are real numbers and i²=-1. The underlying mathematical definition is

tan(z) = sin(z) / cos(z), wherever cos(z) is nonzero.

For a complex result u+vi, its components can be predicted independently:

  • Real part: sin(2a) / (cos(2a) + cosh(2b))
  • Imaginary coefficient: sinh(2b) / (cos(2a) + cosh(2b))

These are mathematical identities, not extra argument syntax supplied by ONLYOFFICE. In the spreadsheet, the documented IMREAL and IMAGINARY functions can be used to inspect the numerical components returned by the original function. The rendered complex-number text, the sign of negative zero, the suffix retained in the output, and internal rounding are not guaranteed by the referenced help pages.

Useful identity: tan(-z) = -tan(z); tan(conjugate(z)) = conjugate(tan(z)). These equalities refer to mathematical functions at defined values and are useful as sanity checks, but do not imply that floating-point worksheet values match character-for-character.

Build a reproducible worksheet from scratch

  1. Open a new empty sheet in ONLYOFFICE Spreadsheet Editor. As documented by the Insert functions manual, you can type directly in the formula bar or use the Formula tab → Function dialog.
  2. Set A1:H1 to Scenario, Real a, Imaginary b, Unit, Complex input, IMTAN result, Observed real, Observed imaginary. If the header IMTAN results are long, widen columns E through H.
  3. In B2 enter 0, in C2 enter 0, and in D2 enter i (plain text, without quoting it in a cell). Continue with the numeric inputs in the table below; one scenario per row. Enter j in D only for rows explicitly marked j.
  4. In E2, enter =COMPLEX(B2,C2,D2); this creates a complex argument in the vendor’s documented format. Copy E2 down through the scenarios. COMPLEX can also be written as =COMPLEX(B2,C2) to request its documented default i suffix.
  5. In F2, enter =IMTAN(E2). Copy F2 down through the scenarios. This is the actual formula under review, not an execution claim.
  6. To inspect the result numerically, enter =IMREAL(F2) in G2 and =IMAGINARY(F2) in H2, then copy them down. The table’s last two columns provide independently calculated reference components. If the application displays fewer digits, format G:H as numbers with at least six decimal places.
  7. Compare your native G:H values against the calculated expectations using a reasonable absolute or relative tolerance (for example 1E-6 on these moderate examples). Record which Desktop build or Docs/web release, locale and workbook format you tested.

Worksheet-reference predictions — NOT screenshot captures or observed ONLYOFFICE results:

Worksheet row Scenario B (a) C (b) D (suffix) Expected Re(IMTAN) Expected Im(IMTAN)
2 Zero 0 0 i 0.000000 0.000000
3 Real positive 0.5 0.5 0 i 0.546302 0.000000
4 Real negative -0.5 -0.5 0 i -0.546302 0.000000
5 Real 1 1 0 i 1.557408 0.000000
6 Real -1 -1 0 i -1.557408 0.000000
7 Real 2 2 0 i -2.185040 0.000000
8 Real -2 -2 0 i 2.185040 0.000000
9 Real 3 3 0 i -0.142547 0.000000
10 Imaginary +0.5 0 0.5 i 0.000000 0.462117
11 Imaginary -0.5 0 -0.5 i 0.000000 -0.462117
12 Imaginary +1 0 1 i 0.000000 0.761594
13 Imaginary -1 0 -1 i 0.000000 -0.761594
14 Imaginary +2 0 2 i 0.000000 0.964028
15 1+i 1 1 i 0.271753 1.083923
16 1-i 1 -1 i 0.271753 -1.083923
17 -1+2i -1 2 i -0.033813 1.014794
18 2-i 2 -1 i -0.243458 -1.166736
19 0.5+0.25i 0.5 0.25 i 0.504501 0.312421
20 -0.5-0.25i -0.5 -0.25 i -0.504501 -0.312421
21 2+2i 2 2 i -0.028393 1.023836
22 3-2i 3 -2 i -0.009884 -0.965386
23 0.1+0.2i 0.1 0.2 i 0.096388 0.199284
24 1+j 1 1 j 0.271753 1.083923
25 2-2j 2 -2 j -0.028393 -1.023836
26 0.75+1.25i 0.75 1.25 i 0.160808 0.975363
27 -2+0.75i -2 0.75 i 0.445501 1.253427

Expected parts are rounded to six decimal places for readability. Use a tolerance rather than requiring equality to the rounded reference values. Values in E and F are complex results, whereas G and H are numerical component readouts. This distinction prevents falsely asserting the application’s exact display of strings such as 1+i, 1+1i or 1+j.

Five quick formulas you can inspect on a blank worksheet

The following one-cell calls use COMPLEX to avoid hand-typing a complex literal. Their mathematical component predictions follow from the table above; display and error details remain untested.

=IMTAN(COMPLEX(0.5,0))
=IMTAN(COMPLEX(1,1))
=IMTAN(COMPLEX(0,1))
=IMTAN(COMPLEX(-1,2))
=IMTAN(COMPLEX(1,1,"j"))

For instance, =IMTAN(COMPLEX(1,1,"j")) and =IMTAN(COMPLEX(1,1,"i")) represent the same mathematical complex coordinate. Whether their displayed strings preserve j or i is a separate native output-format question, not established by the official function summary.

Four detailed, practical walkthroughs

  1. Real-angle check. For z=0.5+0i, tan(z) has real part tan(0.5)≈0.546302 and zero imaginary part.
  2. Imaginary-axis check. For z=0+1i, tan(i)=i·tanh(1), with mathematical imaginary part ≈0.761594.
  3. Quotient identity. At z=1+0.5i, independently compare IMTAN(COMPLEX(B2,C2)) with IMDIV(IMSIN(COMPLEX(B2,C2)),IMCOS(COMPLEX(B2,C2))).
  4. Near-pole caution. At real angles near π/2, cos(z) approaches zero. Very large finite outputs can reflect numerical conditioning, not proof of a reliable native error code.

Advanced methods and independent consistency checks

Ratio identity

tan(z)=sin(z)/cos(z), provided cosine does not vanish.

Imaginary axis

tan(i·b)=i·tanh(b), illustrating nontrivial imaginary outputs.

Pole sensitivity

The mathematical poles at π/2+kπ on the real axis require special numerical care; finite floating-point π/2 is an approximation.

Sheet formulas for an independent reciprocal or symmetry check

Place real part a in B2 and imaginary coefficient b in C2, then use these formulas in any blank cells:

=COMPLEX(B2,C2)
=COMPLEX(-B2,-C2)
=IMTAN(COMPLEX(B2,C2))
=IMTAN(COMPLEX(-B2,-C2))
=IMREAL(IMTAN(COMPLEX(B2,C2)))
=IMAGINARY(IMTAN(COMPLEX(B2,C2)))

The same worksheet permits examining the sign/parity identity above by comparing the final two results with their counterparts at -z. Comparing floating-point numeric components is generally more meaningful than directly comparing complex-number text strings.

For a non-singular input, the following are mathematically equivalent. They are distinct test proposals that have not been run inside ONLYOFFICE:

=IMDIV(IMSIN(COMPLEX(B2,C2)),IMCOS(COMPLEX(B2,C2))) — tangent as sine divided by cosine.

For complex arguments z=a+bi, i·z=-b+ai and -i·z=b-ai, explaining the signed pairs (-C2,B2) and (C2,-B2) in the Euler formulas. Check each nested function’s own official argument rules before modifying these expressions. Related functions are linked below.

Domain limits, stability and common failure modes

Mathematical domain: Poles occur when cos(z)=0: real z=π/2+kπ is the familiar family. Finite floating-point representations near a pole need not produce the same result as an exact mathematical pole. Its mathematical denominator is cos(z); singularities are distinct from the vendor documentation of its one input parameter.

Numerical limits: Floating-point calculations can lose precision near zeros, poles or when hyperbolic sine/cosine grows rapidly. The mathematical values in the table are not guaranteed exact output formatting. The vendor’s one-paragraph IMTAN help entry does not document a specific overflow threshold, rounding mode, sign-of-zero policy or error-code mapping for all invalid inputs. Those require targeted app tests.

Symptom / condition What it can mean Review action
Formula not recognized or name different Version, platform or locale may differ Search IMTAN in the local Insert Function dialog; note the exact build and language. Do not infer support for an older version from today’s online help.
Number provided where complex text expected Input construction differs Use =COMPLEX(B2,C2) instead of relying on how arbitrary strings are parsed.
Blank cell or omitted inumber A required argument is missing Supply an explicit complex value. No default is documented for the function.
#VALUE!, #NUM! or similar is observed during native review Invalid input or a computational limitation could be involved Record the exact observed error and reproduction steps; the present research does not claim a specific code.
Huge result or unexpectedly unstable value Ill-conditioning or large imaginary part Reduce the magnitude; check closeness to trigonometric zeros or poles and compare high-precision reference components.
i versus j output not matching expectation Display behavior can differ from mathematical coordinates Compare IMREAL / IMAGINARY components; test native suffix rendering separately.
Comma-separated formula not accepted Regional formula separator or language mismatch Follow locale-specific editor instructions and record the setting; do not transplant conventions from Excel or another program.

Do not label mathematically undefined as an observed spreadsheet error. Complex tangent is not simply SIN(a)/COS(a) when b ≠ 0, and it has poles where complex cosine vanishes. Exact displayed error behavior at a tangent pole is undocumented in the vendor function page and must not be guessed.

ONLYOFFICE Desktop, web, editions, versions, and file compatibility

The current ONLYOFFICE function catalogue and IMTAN help entry list the function in the unversioned current Docs help. This supports the narrow claim that the current documentation describes IMTAN. It does not establish the first shipping version, parity among self-hosted Docs, cloud Docs, Desktop Editors, mobile editions, or all historical versions.

ONLYOFFICE publishes a Docs changelog; its 10.0.0 release is dated October 10, 2026. That changelog is a release-history reference, not evidence that IMTAN debuted in 10.0. No release-specific function-introduction claim is made here. The current Docs manual explains that the Formula tab and Insert Function interface list available functions, so checking the actual installed product and build is the appropriate remaining compatibility test.

The supplied expressions use standard-looking spreadsheet function names, but another spreadsheet application’s behaviour is not ONLYOFFICE evidence. Opening an .xlsx, .ods or .xls file, calculated-value caching, localized separators, i/j suffix rendering and cross-editor numerical equality must each be tested directly before declaring compatibility. In particular, support for formula evaluation and preservation of stored results are different questions.

Native verification checklist still outstanding: date-stamped Desktop version, date-stamped Docs/web version, install/edition, locale and decimal separator, i/j rendering, invalid input and singularity behavior, tolerance at defined examples, exported .xlsx and .ods round-trip.

Dated, claim-level source record

Date checked (UTC) Claim supported Official source Evidence boundary
2026-10-13 IMTAN returns complex tangent of a complex number; exact syntax and required inumber argument IMTAN reference Unversioned/current documentation only; no native execution.
2026-10-13 COMPLEX(real_num, i_num, [suffix]); lowercase i/j; omitted suffix defaults to i COMPLEX reference Applies to COMPLEX, not to IMTAN.
2026-10-13 IMREAL and IMAGINARY extract complex components IMREAL, IMAGINARY Exact complex-result formatting and application precision not established.
2026-10-13 Entry methods use = and the documented comma separators; categorized Formula tab Insert functions manual Other locales untested.
2026-10-13 Docs 10.0.0 release date is 2026-10-10 Docs changelog Does not prove IMTAN first appeared then or Desktop parity.

Calculation method: cmath (Python standard library) was checked against mpmath with 65-decimal precision for each defined table row; additional identity-based checks were applied where denominators are nonzero. These are independent mathematical calculations, not ONLYOFFICE executions. The official help documents purpose and syntax; it is not the source of the independently calculated six-decimal results.