📦 Archived documentation: r1 (committed 2026-10-07) View current documentation →

Math.exp()

Math.exp(x) → number

Returns e^x, where e is Euler's number.

Returns e raised to the power of x, where e is Euler's number (approximately 2.718), the base of the natural logarithm.

Arguments

NameTypeRequiredDefaultDescription
x number optional — The exponent.

Returns

number e raised to the power x.

Example

let e = Math.exp(1); // 2.718281828459045