- Math trigonometric functions
- math
.acos() - math
.acosh() - math
.asin() - math
.asinh() - math
.atan() - math
.atan2() - math
.atanh() - math
.cos() - math
.cosh() - math
.sin() - math
.sinh() - math
.sqrt() - math
.tan() - math
.tanh()
math.cosh()
Computes the hyperbolic cosine of its argument x.
Parameters
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
.
Errors
If the result would cause an overflow, then fastly.error
will be set to ERANGE
.
Format
FLOAT
math.cosh(FLOAT x)
Examples
1
2
3
declare local var.fo FLOAT;
set var.fo = math.cosh(0);