Javascript Math.exp()方法
作者:--
发布时间:2019-11-20
评论:0
阅读:0
此方法返回 ex, 其中x是参数,e是欧拉不变,自然对数的底数。
语法
math.exp( x ) ;
下面是参数的详细信息:
返回值:
返回变量x的指数值
例子:
<html>
<head>
<title>javascript math exp() method</title>
</head>
<body>
<script type="text/javascript">
var value = math.exp(1);
document.write("first test value : " + value );
var value = math.exp(30);
document.write("<br />second test value : " + value );
var value = math.exp(-1);
document.write("<br />third test value : " + value );
var value = math.exp(.5);
document.write("<br />fourth test value : " + value );
</script>
</body>
</html>
这将产生以下结果:
first test value : 2.718281828459045
second test value : 10686474581524.462
third test value : 0.36787944117144233
fourth test value : 1.6487212707001282