15.8.2.8 Math.exp(x)

2010-07-12

number Math.exp(x)

Returns e^x (e is the base of natural logarithms, Math.E).

Code: (Meta Ecma)
Math.exp = function(x){
x = ToNumber(x);
if (isNaN(x)) return NaN;
if (x === +0) return 1;
if (x === -0) return 1;
if (x === +Infinity) return +Infinity;
if (x === -Infinity) return +0;
return Math.exp(x);
// return Math.pow(Math.E, x);
}