计算ex摘要

Math.exp(x)
参考
x
数值或表达式,被用作指数。

返回值

ex,即e的x次幂。这里e代表自然对数的底数,其近似为2.71828。

exp()语法如下:

实现代码如下:
Math.exp(x) ;

Math.exp()范例:
实现代码如下:

<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>

以上就是【JS数学函数Exp使用说明】的全部内容了,欢迎留言评论进行交流!

赞(0) 踩(0)
发表我的评论

最新评论

  1. 暂无评论