JavaScript中使用指數(shù)方法Math.exp()的簡介
更新時間:2015年06月15日 10:07:33 投稿:goldensun
這篇文章主要介紹了JavaScript中使用指數(shù)方法Math.exp(),是JS入門學(xué)習(xí)中的基礎(chǔ)知識,需要的朋友可以參考下
此方法返回 Ex, 其中x是參數(shù),E是歐拉不變,自然對數(shù)的底數(shù)。
語法
Math.exp( x ) ;
下面是參數(shù)的詳細信息:
- x : 一個數(shù)字.
返回值:
- 返回變量x的指數(shù)值
例子:
<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>
這將產(chǎn)生以下結(jié)果:
First Test Value : 2.718281828459045 Second Test Value : 10686474581524.462 Third Test Value : 0.36787944117144233 Fourth Test Value : 1.6487212707001282
您可能感興趣的文章:
- 輕松掌握JavaScript中的Math object數(shù)學(xué)對象
- Javascript Math ceil()、floor()、round()三個函數(shù)的區(qū)別
- 使用js Math.random()函數(shù)生成n到m間的隨機數(shù)字
- JavaScript Math.ceil 方法(對數(shù)值向上取整)
- JavaScript Math.floor方法(對數(shù)值向下取整)
- js中Math之random,round,ceil,floor的用法總結(jié)
- 介紹JavaScript中Math.abs()方法的使用
- JavaScript中使用Math.PI圓周率屬性的方法
- js Math 對象的方法
- js中常用的Math方法總結(jié)
- JavaScript使用math.js進行精確計算操作示例
- js Math數(shù)學(xué)簡單使用操作示例
相關(guān)文章
基于JavaScript自定義構(gòu)造函數(shù)的詳解說明
本篇文章小編為大家介紹,基于JavaScript自定義構(gòu)造函數(shù)的詳解說明。需要的朋友參考下2013-04-04
javascript開發(fā)技術(shù)大全-第3章 js數(shù)據(jù)類型
字符串類型(string) :由unicode字符、數(shù)字、標點符號組成,在javascript中沒有char字符類型 ,即使只表示一個字符,也必須用到字符串2011-07-07
Javascript中的數(shù)學(xué)函數(shù)
Javascript中的數(shù)學(xué)函數(shù)...2007-04-04

