python中的exp是什么意思
python中的exp是什么意思?针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。
Python exp() 函数
描述
exp() 函数返回 x 的指数,。
语法
importmathmath.exp(x)
注意:exp() 是不能直接访问的,需导入 math 模块,通过静态对象调用该方法。
参数
x -- 数值表达式。
返回值
返回 x 的指数,。
实例
#-*-coding:UTF-8-*-importmath#导入math模块print"math.exp(2):",math.exp(2)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)
输出:
math.exp(2):7.38905609893math.exp(100.12):3.03084361407e+43math.exp(100.72):5.52255713025e+43math.exp(119L):4.7978133273e+51math.exp(math.pi):23.1406926328
关于python中的exp是什么意思问题的解答就分享到这里了,希望以上内容可以对大家有一定的帮助,如果你还有很多疑惑没有解开,可以关注亿速云行业资讯频道了解更多相关知识。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。