1 |
|
2 |
|
3 | # Function expm1
|
4 |
|
5 | Calculate the value of subtracting 1 from the exponential value.
|
6 | For matrices, the function is evaluated element wise.
|
7 |
|
8 |
|
9 | ## Syntax
|
10 |
|
11 | ```js
|
12 | math.expm1(x)
|
13 | ```
|
14 |
|
15 | ### Parameters
|
16 |
|
17 | Parameter | Type | Description
|
18 | --------- | ---- | -----------
|
19 | `x` | number | BigNumber | Complex | Array | Matrix | A number or matrix to apply expm1
|
20 |
|
21 | ### Returns
|
22 |
|
23 | Type | Description
|
24 | ---- | -----------
|
25 | number | BigNumber | Complex | Array | Matrix | Exponent of `x`
|
26 |
|
27 |
|
28 | ## Examples
|
29 |
|
30 | ```js
|
31 | math.expm1(2) // returns number 6.38905609893065
|
32 | math.pow(math.e, 2) - 1 // returns number 6.3890560989306495
|
33 | math.log(math.expm1(2) + 1) // returns number 2
|
34 |
|
35 | math.expm1([1, 2, 3])
|
36 | // returns Array [
|
37 | // 1.718281828459045,
|
38 | // 6.3890560989306495,
|
39 | // 19.085536923187668
|
40 | // ]
|
41 | ```
|
42 |
|
43 |
|
44 | ## See also
|
45 |
|
46 | [exp](exp.md),
|
47 | [log](log.md),
|
48 | [pow](pow.md)
|