Function sech #
Calculate the hyperbolic secant of a value,
defined as sech(x) = 1 / cosh(x)
.
To avoid confusion with the matrix hyperbolic secant, this function does not apply to matrices.
Syntax #
math.sech(x)
Parameters #
Parameter | Type | Description |
---|---|---|
x |
number | BigNumber | Complex | Function input |
Returns #
Type | Description |
---|---|
number | BigNumber | Complex | Hyperbolic secant of x |
Throws #
Type | Description —- | ———–
Examples #
// sech(x) = 1/ cosh(x)
math.sech(0.5) // returns 0.886818883970074
1 / math.cosh(0.5) // returns 0.886818883970074