exp() 方法可返回 e 的 x 次冪的值。
Math.exp(x)
參數(shù) | 描述 |
---|---|
x | 必需。任意數(shù)值或表達式。被用作指數(shù)。 |
返回 e 的 x 次冪。e 代表自然對數(shù)的底數(shù),其值近似為 2.71828。
在下面的例子中,我們將把 exp() 運用到不同的數(shù)值上:
<script type="text/javascript"> document.write(Math.exp(1) + "<br />") document.write(Math.exp(-1) + "<br />") document.write(Math.exp(5) + "<br />") document.write(Math.exp(10) + "<br />") </script>
輸出:
2.718281828459045 0.36787944117144233 148.4131591025766 22026.465794806718
如對本文有疑問,請?zhí)峤坏浇涣髡搲瑥V大熱心網(wǎng)友會為你解答?。?點擊進入論壇
Powered by 365建站網(wǎng) RSS地圖 HTML地圖
copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號