UNPKG

977 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function exp
4
5Calculate the exponent of a value.
6For matrices, the function is evaluated element wise.
7
8
9## Syntax
10
11```js
12math.exp(x)
13```
14
15### Parameters
16
17Parameter | Type | Description
18--------- | ---- | -----------
19`x` | number &#124; BigNumber &#124; Complex &#124; Array &#124; Matrix | A number or matrix to exponentiate
20
21### Returns
22
23Type | Description
24---- | -----------
25number &#124; BigNumber &#124; Complex &#124; Array &#124; Matrix | Exponent of `x`
26
27
28## Examples
29
30```js
31math.exp(2) // returns number 7.3890560989306495
32math.pow(math.e, 2) // returns number 7.3890560989306495
33math.log(math.exp(2)) // returns number 2
34
35math.exp([1, 2, 3])
36// returns Array [
37// 2.718281828459045,
38// 7.3890560989306495,
39// 20.085536923187668
40// ]
41```
42
43
44## See also
45
46[expm1](expm1.md),
47[log](log.md),
48[pow](pow.md)