--- layout: default ---

Function coth #

Calculate the hyperbolic cotangent of a value, defined as `coth(x) = 1 / tanh(x)`. To avoid confusion with the matrix hyperbolic cotangent, this function does not apply to matrices.

Syntax #

```js math.coth(x) ```

Parameters #

Parameter | Type | Description --------- | ---- | ----------- `x` | number | BigNumber | Complex | Function input

Returns #

Type | Description ---- | ----------- number | BigNumber | Complex | Hyperbolic cotangent of x

Throws #

Type | Description ---- | -----------

Examples #

```js // coth(x) = 1 / tanh(x) math.coth(2) // returns 1.0373147207275482 1 / math.tanh(2) // returns 1.0373147207275482 ```

See also #

[sinh](sinh.html), [tanh](tanh.html), [cosh](cosh.html)