JavaScript exp() Method
Complete Math Object Reference
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
In the following example we will 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 Demos
exp()
How to use exp().
Complete Math Object Reference
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|