Engineering functions
IMSEC
Matches all 3 recorded answers
Recorded: 3 workbook cells. How we measure this · See the Rust code
Local names in 40 languages
| Language | Name in Excel |
|---|---|
| Arabic | IMSEC |
| Bulgarian | IMSEC |
| Czech | IMSEC |
| Danish | IMAGSEC |
| German | IMSEC |
| Greek | IMSEC |
| English (Australia) | IMSEC |
| English (United Kingdom) | IMSEC |
| English (United States) | IMSEC |
| Spanish | IM.SEC |
| Estonian | IMSEC |
| Finnish | KOMPLEKSI.SEK |
| French | COMPLEXE.SEC |
| Hebrew | IMSEC |
| Croatian | IMSEC |
| Hungarian | KÉPZ.SEC |
| Indonesian | IMSEC |
| Italian | IMSEC |
| Japanese | IMSEC |
| Korean | IMSEC |
| Lithuanian | IMSEC |
| Latvian | IMSEC |
| Norwegian | IMSEC |
| Dutch | C.SEC |
| Polish | SEC.LICZBY.ZESP |
| Portuguese (Brazil) | IMSEC |
| Portuguese (Portugal) | IMSEC |
| Romanian | IMSEC |
| Russian | МНИМ.SEC |
| Slovak | IMSEC |
| Slovenian | IMSEC |
| Serbian (Latin) | IMSEC |
| Swedish | IMSEK |
| Thai | IMSEC |
| Turkish | SANSEC |
| Ukrainian | IMSEC |
| Vietnamese | IMSEC |
| Chinese (Simplified) | IMSEC |
| Chinese (Hong Kong) | IMSEC |
| Chinese (Traditional) | IMSEC |
Names from Microsoft's support site.
What it does
IMSEC(inumber)
IMSEC(inumber) returns the complex secant, mathematically the reciprocal of IMCOS. It returns complex text even if the imaginary component is zero.
Try it
=IMSEC("i") gives real text about "0.648054273663885", the reciprocal of the mathematical cosh(1). This is less than one, although a real secant away from its poles has magnitude at least one.
Quirks
Complex arguments may be real numbers or text such as "2-3i". Use lowercase i or j; operands in one call must agree on the suffix. The current parser rejects malformed complex text with #NUM! and logical values with #VALUE!. A complex result is text, so ordinary worksheet arithmetic does not automatically treat it as a pair of numeric components. A zero denominator gives #NUM! in the current reciprocal helper. Near a pole, small changes in the input can cause large changes in the result.
How to implement
Parse the two coefficients and suffix before doing arithmetic; use the common complex formatter afterward. Retain suffix consistency, suppress a zero component and omit the coefficient one before the imaginary unit. Formatting and parsing have their own fifteen-significant-digit rules, so testing only the algebra misses observable behaviour.
First compute the unformatted complex IMCOS pair (c,d). If abs(c)>=abs(d), use r=d/c, v=1/(c+d*r), and return (v,-r*v). Otherwise use r=c/d, v=1/(d+c*r), and return (r*v,-v). Reject (0,0) before division. The current reciprocal forms one reciprocal and multiplies a component by it; calling generic IMDIV with numerator one forms a different rounded graph. Keep this distinction when reproducing recorded results.
Rust code
Show the CalcFunc source of this function
Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.
IMSEC · 1 lines · calc-func/src/catalogue/engineering.rs on GitHub45 imsec "IMSEC" (1, 1) [V "inumber"] |s, a, sv| { unary_complex(s, a, |z| z.sec()) }
Kernels shared with other functions
complex_ofcatalogue/engineeringcomplex_textcatalogue/engineeringunary_complexcatalogue/engineeringnearest_evenported/complex_decimaldecimal_pairported/complex_decimalparse_ascii_decimal_15ported/complex_familyParsedComplex::newported/complex_familyParsedComplex::absported/complex_familynormalize_zeroported/complex_familynumber_to_excel_textported/complex_familyformat_complex_textported/complex_familyparse_real_numberported/complex_familyfind_real_imag_splitported/complex_familyparse_imag_coeffported/complex_familyparse_complex_textported/complex_familysuffix_from_operandsported/complex_family
Argument and result plumbing
failcatalogue/kittextcatalogue/kittext_valuecatalogue/kit
No implementation has been published with a Handbook test suite for this function.
Version differences
No same-input comparison between named Excel builds is recorded for this function here. The documented behaviour below is not a measurement of every Excel release.
Alternatives
IMCOS supplies the denominator; IMDIV divides arbitrary complex inputs; COMPLEX creates a value from coefficients.
Named variants
No named variants are recorded yet.
Suggest a correction or contribute an implementation · For agents