函数 sech #
计算值的双曲正割,定义为 sech(x) = 1 / cosh(x)。
为避免与矩阵双曲正割混淆,此函数不适用于矩阵。
Syntax #
math.sech(x)
Parameters #
| Parameter | Type | Description |
|---|---|---|
x |
number | BigNumber | Complex | 函数输入 |
Returns #
| Type | Description |
|---|---|
| number | BigNumber | Complex | 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