JavaScript exp() Method
JavaScript Math Object
Definition and Usage
The exp() method returns the value of Ex, where E is Euler's constant (approximately 2.7183) and x is the number passed to it.
Syntax
| Parameter |
Description |
| x |
Required. A number |
Tips and Notes
Tip: E is the Euler's constant, which is the base of natural logarithms (approximately 2.7183).
Example
Example
Use the exp() method on different numbers:
<script type="text/javascript">
document.write(Math.exp(1) + "<br />");
document.write(Math.exp(-1) + "<br />");
document.write(Math.exp(5) + "<br />");
document.write(Math.exp(10) + "<br />");
</script>
|
The output of the code above will be:
2.718281828459045
0.36787944117144233
148.4131591025766
22026.465794806718
|
Try it yourself »
|
JavaScript Math Object
Click here to design a Stunning Flash Website for Free
Wix is a revolutionary web design tool that provides anyone with the possibility to create professional and beautiful websites for free.
With e-commerce features, search engine visibility and many more professional tools, Wix is the ultimate solution for creating a spectacular site while saving tons of money.
|