simple-squiggle/node_modules/mathjs/docs/reference/functions/expm1.md

1.1 KiB

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

Throws

Type Description

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
// ]

See also

exp, log, pow