更多“試一試”的例子。
定義和用法
該exp()方法返回e x的值,其中E是歐拉數 (約2.7183),x是傳遞給它的數量。
瀏覽器支持
方法 | |||||
---|---|---|---|---|---|
exp() | 是 | 是 | 是 | 是 | 是 |
句法
Math.exp( x )
參數值
Parameter | Description |
---|---|
x | Required. A number |
技術細節
返回值: | 一個數字,代表E X |
---|---|
JavaScript的版本: | 1.0 |

更多示例
例
使用exp()對不同的號碼的方法:
var a = Math.exp(-1);
var b = Math.exp(5);
var c = Math.exp(10);
的結果,b和c將是:
0.36787944117144233
148.4131591025766
22026.465794806718
試一試» 