SEC Function (OpenOffice Calc)
Calculate secant with OpenOffice SEC, using native real-input examples, even-function checks and precise zero and numerical-boundary behavior.
Verification status: Eight reference formulas and 6 diagnostic cases were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, using generated native ODF and GUI hard recalculation. Saved formula identities and typed results were checked; the load warning is described below. How formula examples are checked
Quick answer: =SEC(2) returned -2.402997961722 in the tested Apache OpenOffice 4.1.16 build.
Availability and version history
- Introduced: First release not established; presence is verified in Apache OpenOffice 4.1.16. Earlier support has not been established here.
- Supported in: Apache OpenOffice 4.1.16; this identifies a verified release, not a final supported version.
- Scope: Desktop Calc, English function names and semicolon-separated formulas.
- Checked: October 14, 2026. Eight reference formulas and the listed diagnostics were recalculated from generated native ODF in 4.1.16 on Linux x86-64, Build 9816. Source and independent reference calculations were also checked.
What SEC returns
SEC calculates secant, mathematically 1/cos(x). It returns a real numeric value for a valid finite input where the defining denominator is nonzero. The implementation evaluates the reciprocal directly, so denominator zeros and floating-point behavior matter. Release entry.
Syntax and arguments
=SEC(Number)
Supply one numeric argument. The argument is an angle in radians; degrees require an explicit RADIANS conversion. The observed TRUE argument becomes 1, and a referenced empty cell becomes 0. Non-numeric text and an extra argument produce errors in the tested cases.
Reproducible examples
The native column records the saved 4.1.16 results. The independent values use high-precision mathematics; displayed decimals are rounded to twelve places. Integer results remain exact in these small cases.
| Formula | Native 4.1.16 result | Independent reference |
|---|---|---|
=SEC(0.25) |
1.032085023984 |
1.032085023984 |
=SEC(0.5) |
1.139493927325 |
1.139493927325 |
=SEC(1) |
1.850815717681 |
1.850815717681 |
=SEC(2) |
-2.402997961722 |
-2.402997961722 |
=SEC(-0.25) |
1.032085023984 |
1.032085023984 |
=SEC(-0.5) |
1.139493927325 |
1.139493927325 |
=SEC(-1) |
1.850815717681 |
1.850815717681 |
=SEC(-2) |
-2.402997961722 |
-2.402997961722 |
Practical worksheet
SEC expects radians and returns the reciprocal of cosine. For a right triangle this is hypotenuse divided by adjacent length. At 0.5 radians the result is about 1.139493927325. For degree measurements in A2, write =SEC(RADIANS(A2)) to make the unit conversion explicit.
Advanced interpretation and checks
SEC(x)×COS(x)=1 away from the poles. Secant is even, so the positive and negative inputs in the table have equal results. The identity SEC(x)^2−TAN(x)^2=1 is another moderate-input check. SEC is not ACOS: a reciprocal ratio and an inverse-angle calculation answer different questions.
Boundaries and troubleshooting
Secant is defined at zero, where it equals 1. Its poles are odd multiples of π/2. The saved SEC(PI()/2) result is a large finite number from a rounded angle, not a true value at exact π/2. Do not interpret that near-pole output as a stable engineering ratio.
These additional formulas were recalculated from the same generated ODF input. H5 is a deliberately empty cell where referenced. Error displays are retained as errors, even when an ODS numeric attribute stores zero.
| Formula | Observed result or error |
|---|---|
=SEC(0) |
1 |
=SEC(PI()/2) |
16331239353195400 |
=SEC("abc") |
#VALUE! |
=SEC(H5) |
1 |
=SEC(1;2) |
Err:508 |
=SEC(TRUE()) |
1.850815717681 |
Related functions
Official evidence and checking scope
The generated ODF input produced the informational load warning “Not all attributes could be read.” After it was acknowledged, the sheet was hard-recalculated and saved separately. Every formula identity, input label and tested result was reconciled, including repeated spaces represented with ODF text elements. This does not certify every style attribute. The separately prepared XLSX input was not executed. A deliberately stale SUM cache changed from 999999 to 3, and an uncached SUM returned 7 after hard recalculation. Native evidence covers the eight reference formulas and listed diagnostics only. Other explanatory compositions are independent mathematical checks; other releases, locales and extreme-value behavior were not established by this run.