|
| JAVASCRIPT exp() MATH OBJECT METHODS
The exp() math object method returns the value of E to the power of a number x. E is referred to as the Euler's constant which is the base of natural logarithms and has an approximate value of 2.7183.
The general format is:
Math.exp(x)
Parameter x is required and must be number.
Example:
<script type="text/javascript">
document.write(Math.exp(0.5) + '<br>');
document.write(Math.exp(-1) + '<br>');
document.write(Math.exp(1) + '<br>');
document.write(Math.exp(-2));
</script>
The above will output:
See Also:
abs(x)
To return the absolute value of x.
acos(x)
To return the arccosine of x.
asin(x)
To return the arcsine of x.
atan(x)
To return the arctangent of x.
atan2(y,x)
To return the angle between a point and the x axis.
ceil(x)
To return the next integer rounded up.
cos(x)
To return the cosine of x.
exp(x)
To return the value of E raised to the power of x.
floor(x)
To return the next integer rounded down.
log(x)
To return the natural log of x.
max(x,y)
To return the number with the highest value of x and y.
min(x,y)
To return the number with the lowest value of x and y.
pow(x,y)
To return the value of number x raised to the power of y.
random()
To return a random number between 0 and 1.
round(x)
Rounds x to the nearest integer
sin(x)
To return the sine of x.
sqrt(x)
To return the square root of x
tan(x)
To return the tangent of x.
 |
|
|