mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
1.4 KiB
1.4 KiB
| layout |
|---|
| default |
Function expm1 #
Calculate the value of subtracting 1 from the exponential value. For matrices, the function is evaluated element wise.
Syntax #
math.expm1(x)
Parameters #
| Parameter | Type | Description |
|---|---|---|
x |
number | BigNumber | Complex | Array | Matrix | A number or matrix to apply expm1 |
Returns #
| Type | Description |
|---|---|
| number | BigNumber | Complex | Array | Matrix | Exponent of x |
Examples #
math.expm1(2) // returns number 6.38905609893065
math.pow(math.e, 2) - 1 // returns number 6.3890560989306495
math.log(math.expm1(2) + 1) // returns number 2
math.expm1([1, 2, 3])
// returns Array [
// 1.718281828459045,
// 6.3890560989306495,
// 19.085536923187668
// ]