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

Last update at: 2026/05/26 17:22:09