欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Python3中exp()函數(shù)用法分析

 更新時間:2019年02月19日 15:12:21   投稿:laozhang  
在本篇文章里小編給大家整理了關(guān)于Python3中exp()函數(shù)用法以及相關(guān)知識點(diǎn),需要的朋友們學(xué)習(xí)下。

描述

exp() 方法返回x的指數(shù),ex。

語法

以下是 exp() 方法的語法:

import math

math.exp( x )

注意:exp()是不能直接訪問的,需要導(dǎo)入 math 模塊,通過靜態(tài)對象調(diào)用該方法。

參數(shù)

x -- 數(shù)值表達(dá)式。

返回值

返回x的指數(shù),ex。

實(shí)例

以下展示了使用 exp() 方法的實(shí)例:

#!/usr/bin/python3
import math  # 導(dǎo)入 math 模塊

print ("math.exp(-45.17) : ", math.exp(-45.17))
print ("math.exp(100.12) : ", math.exp(100.12))
print ("math.exp(100.72) : ", math.exp(100.72))
print ("math.exp(math.pi) : ", math.exp(math.pi))

以上實(shí)例運(yùn)行后輸出結(jié)果為:

math.exp(-45.17) : 2.4150062132629406e-20
math.exp(100.12) : 3.0308436140742566e+43
math.exp(100.72) : 5.522557130248187e+43
math.exp(math.pi) : 23.140692632779267

相關(guān)文章

最新評論