承接国内外服务器租用托管、定制开发、网站代运营、网站seo优化托管接单、网站代更新,新老站点皆可!!咨询QQ:3787320601
当前位置:首页  >  互联网圈  >  python怎么引入exp函数

python怎么引入exp函数

管理员 2023-03-27 09:53:21 互联网圈 50 ℃ 0 评论 1054字 收藏

python怎样引入exp函数

python如何引入exp函数

在python中引入exp函数的方法

在python使用exp函数时,需要先导入math模块

exp():exp()函数的功能是求e x e^{x}e x 的值。

exp()函数语法:

import math

math.exp( x )

exp()函数使用方法:

import math # 导入math模块

print "math.exp(⑷5.17) : ", math.exp(⑷5.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)

输出结果为:

math.exp(⑷5.17) : 2.41500621326e⑵0

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怎么引入exp函数

https://www.wanzijz.com/view/4529.html

TAG: python exp函数

相关文章

Related articles

X

截屏,微信识别二维码

微信号:weimawl

(点击微信号复制,添加好友)

打开微信