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
ParameterTypeRequiredDescription
numberTYesAny 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
    -- cosh(0) = 1
    f1 := COSH(0e0),
    -- cosh(1)
    f2 := COSH(1e0),
    -- Even function
    f3 := COSH(-1e0),
    -- cosh(2)
    f4 := COSH(2e0)
;
Result
f1 VARCHARf2 VARCHARf3 VARCHARf4 VARCHAR
1.01.54308063481524371.54308063481524373.7621956910836314

Last update at: 2026/06/20 10:08:10