COSH()
All functions > MATH > COSH()
Returns the hyperbolic cosine of a number.
Signatures
Hyperbolic cosine
Returns: Hyperbolic cosine, always ≥ 1
COSH(number: T) → DOUBLE sql
| Parameter | Type | Required | Description |
|---|---|---|---|
number | T | Yes | Any floating-point number |
With:
T: Floating-point type (FLOAT, DOUBLE)
Signature notes:
- Definition:
COSH(x) = (e^x + e^(-x)) / 2 - Always returns values ≥ 1
- Even function:
COSH(-x) = COSH(x) - Returns NULL if the input is NULL
Examples
FeatureQL
SELECT
f1 := COSH(0E0), -- cosh(0) = 1
f2 := COSH(1E0), -- cosh(1)
f3 := COSH(-1E0), -- Even function
f4 := COSH(2E0) -- cosh(2)
;Result
| f1 VARCHAR | f2 VARCHAR | f3 VARCHAR | f4 VARCHAR |
|---|---|---|---|
| 1.0 | 1.5430806348152437 | 1.5430806348152437 | 3.7621956910836314 |
On this page