1 |
|
2 |
|
3 | # Function coth
|
4 |
|
5 | Calculate the hyperbolic cotangent of a value,
|
6 | defined as `coth(x) = 1 / tanh(x)`.
|
7 |
|
8 | For matrices, the function is evaluated element wise.
|
9 |
|
10 |
|
11 | ## Syntax
|
12 |
|
13 | ```js
|
14 | math.coth(x)
|
15 | ```
|
16 |
|
17 | ### Parameters
|
18 |
|
19 | Parameter | Type | Description
|
20 | --------- | ---- | -----------
|
21 | `x` | number | Complex | Unit | Array | Matrix | Function input
|
22 |
|
23 | ### Returns
|
24 |
|
25 | Type | Description
|
26 | ---- | -----------
|
27 | number | Complex | Array | Matrix | Hyperbolic cotangent of x
|
28 |
|
29 |
|
30 | ## Examples
|
31 |
|
32 | ```js
|
33 | // coth(x) = 1 / tanh(x)
|
34 | math.coth(2) // returns 1.0373147207275482
|
35 | 1 / math.tanh(2) // returns 1.0373147207275482
|
36 | ```
|
37 |
|
38 |
|
39 | ## See also
|
40 |
|
41 | [sinh](sinh.md),
|
42 | [tanh](tanh.md),
|
43 | [cosh](cosh.md)
|