Contact

IMCOS Function (OpenOffice Calc)

Engineering Intermediate OpenOffice Calc

Evaluate complex cosine in Apache OpenOffice Calc, with radian inputs, hyperbolic component formulas and exact native result strings.

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: =IMCOS("1+i") returned 0.833730025131149-0.988897705762865i in the tested Apache OpenOffice 4.1.16 build.

Availability and version history

  • Introduced: First release not established; documented by OpenOffice.org 3.3.
  • 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 IMCOS returns

IMCOS returns the cosine of a parsed complex number. Unlike real cosine, a complex cosine is not confined to the real interval from −1 to 1. Both real and imaginary components can appear in the returned text. For z=a+bi, the independent component formula is cos(a+bi)=cos(a)cosh(b)−i sin(a)sinh(b). Release entry.

Syntax and arguments

=IMCOS(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
=IMCOS("1+i") 0.833730025131149-0.988897705762865i (0.833730025131, -0.988897705763)
=IMCOS("1-i") 0.833730025131149+0.988897705762865i (0.833730025131, 0.988897705763)
=IMCOS("-1+i") 0.833730025131149+0.988897705762865i (0.833730025131, 0.988897705763)
=IMCOS("-1-i") 0.833730025131149-0.988897705762865i (0.833730025131, -0.988897705763)
=IMCOS("1") 0.54030230586814 (0.540302305868, 0)
=IMCOS("i") 1.54308063481524 (1.543080634815, 0)
=IMCOS("0.5+0.25i") 0.905150150559607-0.121108796043812i (0.90515015056, -0.121108796044)
=IMCOS("2+0.5i") -0.469257978229053-0.473830620416407i (-0.469257978229, -0.473830620416)

Practical worksheet

For 1+i, the real component is about 0.833730025131 and the imaginary component is about −0.988897705763. The negative imaginary sign is essential: using a plus sign would give the conjugate instead. A pure imaginary input i returns the real value cosh(1), about 1.543080634815, which is valid even though it exceeds 1.

For a worksheet, place a validated complex value in A2 and use =IMCOS(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

Cosine is even: cos(−z)=cos(z). It also respects conjugation, so cos(conjugate(z))=conjugate(cos(z)). The four quadrant rows make these sign relationships visible.

The identity cos(z)²+sin(z)²=1 uses complex squares, not squared magnitudes. For z=1+i, summing the squared magnitudes would produce cosh(2), which exceeds 1. Use IMPRODUCT and IMSUM for a worksheet identity rather than treating the strings as ordinary real numbers.

Boundaries and troubleshooting

Zero is valid and returns the string 1. There are no finite mathematical poles of complex cosine, but large imaginary components can make the hyperbolic factors overflow. The formatter rejects nonfinite components; the ordinary examples do not establish a universal safe input range.

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
=IMCOS("0") 1
=IMCOS("abc") Err:502
=IMCOS("") Err:502
=IMCOS("1+j") 0.833730025131149-0.988897705762865j
=IMCOS("1";2) Err:504

Other spreadsheet implementations

The IMCOS 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

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.