博学而笃志 切问而近思 仁在其中
详情
Javascript Math.exp()方法
作者:--     发布时间:2019-11-20     评论:0     阅读:0

此方法返回 ex, 其中x是参数,e是欧拉不变,自然对数的底数。

语法

math.exp( x ) ;

下面是参数的详细信息:

  • 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 

 



下一篇:测试
相关文章
loading......
最新动态
所有评论

loading......

网站声明:
本站部分内容来自网络,如您发现本站内容
侵害到您的利益,请联系本站管理员处理。
联系站长
373515719@qq.com
关于本站:
编程参考手册