TANH Function (OpenOffice Calc)
Learn the TANH function in Apache OpenOffice Calc: Returns the hyperbolic tangent of a number.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Availability and version history
- Introduced: Documented by Apache OpenOffice 4.1.16; original introduction not established.
- Availability: Supported in Apache OpenOffice 4.1.16, verified against its function registry. This identifies a supported release, not a final working version.
- Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
- Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.
TANH returns the hyperbolic tangent of a real number. It equals SINH(x)/COSH(x), with a smooth increasing curve through zero that approaches -1 and 1. It can express a bounded transformation of an unbounded input, but it is not ordinary TAN and has no repeating angular poles.
Syntax and arguments
=TANH(number)
number is one required real numeric argument. There is no optional slope or scale parameter; any scaling must be explicit in the expression supplied. The 4.1.16 interpreter calls its hyperbolic tangent implementation. Mathematically, finite real inputs produce values strictly between -1 and 1. English function names and semicolon separators are used in the formulas.
Reproducible examples
| Formula | Expected result (approximately where decimal) |
|---|---|
=TANH(0) |
0 |
=TANH(1) |
0.761594155956 |
=TANH(-1) |
-0.761594155956 |
=TANH(2) |
0.964027580076 |
=TANH(-2) |
-0.964027580076 |
=TANH(0.5) |
0.462117157260 |
The first formula retains the original guide’s example and result. Its comparable LibreOffice 25.2 check was not an OpenOffice execution. New numerical results are independently calculated expectations, not observed native or GUI results. Decimal approximations are shown to twelve places unless a formula explicitly rounds them.
Practical worksheet: create an explicitly scaled bounded score
Enter -4, -2, 0, 2 and 4 in A2:A6. Enter the positive scale 2 in E1. In B2 enter =TANH(A2/$E$1) and fill down. Expected values rounded to six decimals are -0.964028, -0.761594, 0, 0.761594 and 0.964028. The absolute reference keeps the scale fixed when copying.
This is a chosen mathematical transformation, not a probability calibration or a proof that the inputs are comparable. Changing E1 changes how quickly the score approaches its limits. Keep the raw values and document the scale instead of treating the transformed score as self-explanatory.
Advanced applications
Invert an unsaturated value. With a moderate input x=1, =ATANH(TANH(1)) returns approximately 1. In the scaled worksheet, the inverse is =$E$1*ATANH(B2) when B2 remains strictly between -1 and 1. If B2 was rounded to an endpoint, the inverse is invalid and cannot recover the original magnitude.
Compare an explanatory ratio. =SINH(1)/COSH(1) gives approximately 0.761594155956. For very large inputs both components can overflow, even though TANH itself has a bounded answer. Use the dedicated function rather than a ratio that creates huge intermediate values.
Map to a zero-to-one range deliberately. =(TANH(A2)+1)/2 maps the exact real function into the open interval (0,1). At A2=0 it gives 0.5. This algebraic range change alone does not turn a score into a statistically justified probability.
Errors, edge cases and troubleshooting
The real mathematical range is open, but finite-precision arithmetic or display rounding may produce an endpoint indistinguishable from 1 or -1 for sufficiently large input magnitude. Do not assume ATANH can invert every stored TANH output. Rounding a transformed column before inversion can destroy information.
TANH is not TAN. It has no periodic singularities at odd multiples of PI()/2. It also is not a hard cap: moderate values are smoothly compressed, and their differences change. A scale of zero in TANH(A2/$E$1) causes a division problem before TANH can evaluate. Require a positive scale for the intended orientation.
The function expects a numeric model parameter, not a degree-labelled angle unless a specific derivation says otherwise. Numeric-looking text, missing values and upstream errors need explicit input handling. No exact saturation threshold, extreme-value execution or automatic array-spill behavior is certified by these ordinary scalar examples.
Related functions
Documentation and verification
See the Apache OpenOffice TANH reference, 4.1.16 mathematical-function help, and versioned interpreter. The cached source records retain their original October 13, 2026 retrieval dates. Source inspection and independent reference calculations are not native application testing. The supported release above is not a final working version; first introduction and last functioning version remain unestablished.