2022-07-23 12:23:14 +02:00

55 lines
1.3 KiB
Markdown

---
layout: default
---
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
<h1 id="function-coth">Function coth <a href="#function-coth" title="Permalink">#</a></h1>
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.
<h2 id="syntax">Syntax <a href="#syntax" title="Permalink">#</a></h2>
```js
math.coth(x)
```
<h3 id="parameters">Parameters <a href="#parameters" title="Permalink">#</a></h3>
Parameter | Type | Description
--------- | ---- | -----------
`x` | number &#124; BigNumber &#124; Complex | Function input
<h3 id="returns">Returns <a href="#returns" title="Permalink">#</a></h3>
Type | Description
---- | -----------
number &#124; BigNumber &#124; Complex | Hyperbolic cotangent of x
<h3 id="throws">Throws <a href="#throws" title="Permalink">#</a></h3>
Type | Description
---- | -----------
<h2 id="examples">Examples <a href="#examples" title="Permalink">#</a></h2>
```js
// coth(x) = 1 / tanh(x)
math.coth(2) // returns 1.0373147207275482
1 / math.tanh(2) // returns 1.0373147207275482
```
<h2 id="see-also">See also <a href="#see-also" title="Permalink">#</a></h2>
[sinh](sinh.html),
[tanh](tanh.html),
[cosh](cosh.html)