COSH
All functions > MATH > COSH
Returns the hyperbolic cosine of a number.
Signatures
Returns: Hyperbolic cosine result (always >= 1)
COSH(number: T) → DOUBLE sql
| Parameter | Type | Required | Description |
|---|---|---|---|
number | T | Yes | Any real number (DOUBLE) |
Notes
- Definition:
COSH(x) = (e^x + e^(-x)) / 2 - Always returns values >= 1
COSH(0) = 1- Even function:
COSH(-x) = COSH(x) - Grows exponentially for large |x|
- Related to regular cosine but for hyperbolic geometry
- Returns NULL if input is NULL
Examples
FeatureQL
SELECT
f1 := COSH(0e0), -- Hyperbolic cosine of 0 is 1
f2 := COSH(1e0), -- Hyperbolic cosine of 1
f3 := COSH(-1e0), -- Even function: COSH(-1) = COSH(1)
f4 := COSH(2e0) -- Hyperbolic cosine of 2
;Result
| f1 VARCHAR | f2 VARCHAR | f3 VARCHAR | f4 VARCHAR |
|---|---|---|---|
| 1.0 | 1.5430806348152437 | 1.5430806348152437 | 3.7621956910836314 |
On this page