exp

Returns Ex, where x is the argument, and E is Euler's constant, the base of the natural logarithms.

Applies to

Math

Syntax

exp(x)

Parameters

x

A number.

Description

exp is a static method of Math. As a result, you always use it as Math.exp(), rather than as a method of a Math object you create.

Examples

The following function returns the exponential value of the variable x:

function getExp(x) {
      return Math.exp(x)
}

If you pass getExp the value 1, it returns 2.718281828459045.

See also

Math:E, Math:log, Math:pow