Math.exp()
WE can get value of E to the power of x by using exp() JavaScript function , here E is the Euler's number a constant. Its value is 2.71828
Math.exp(x) ;
Examples.
<script language='JavaScript' type='text/JavaScript'>
<!--
document.write(Math.exp(2)); // output is 7.38905609893065
document.write("<br>");
document.write(Math.exp(1)); // output is 2.718281828459045
document.write("<br>");
document.write(Math.exp(-2)); // output is 0.1353352832366127
document.write("<br>");
document.write(Math.exp(.25)); // output is 1.2840254166877414
document.write("<br>");
document.write(Math.exp(-0.46)); // output is 0.631283645506926
//-->
</script>
Log value of a number →
←JavaScript Math Reference
← Subscribe to our YouTube Channel here
This article is written by plus2net.com team.
plus2net.com