mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
1.3 KiB
1.3 KiB
| layout |
|---|
| default |
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