Available inall subroutines.

Computes the hyperbolic cosine of its argument x.


x - Floating point value representing a hyperbolic angle.

Return Value

Upon successful completion, this function returns the hyperbolic cosine of x.

If x is math.NAN, a NaN will be returned.

If x is ±0, the value 1.0 will be returned.

If x is math.POS_INFINITY or math.NEG_INFINITY, math.POS_INFINITY will be returned.

If the result would cause an overflow, a range error occurs and math.cosh() will return the value of the macro math.POS_HUGE_VAL.


If the result would cause an overflow, then fastly.error will be set to ERANGE.


declare local FLOAT;
set = math.cosh(0);

User contributed notes


Do you see an error in this page? Do have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact