中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

Python exp() 函數(shù)

Python 數(shù)字 Python 數(shù)字


描述

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


語法

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

import math

math.exp( x )

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


參數(shù)

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

返回值

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

實例

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

#!/usr/bin/python
import math   # 導入 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(119L) : ", math.exp(119L)
print "math.exp(math.pi) : ", math.exp(math.pi)

以上實例運行后輸出結(jié)果為:

math.exp(-45.17) :  2.41500621326e-20
math.exp(100.12) :  3.03084361407e+43
math.exp(100.72) :  5.52255713025e+43
math.exp(119L) :  4.7978133273e+51
math.exp(math.pi) :  23.1406926328

Python 數(shù)字 Python 數(shù)字

其他擴展