Python math.exp() 方法
实例
返回 E 次不同数字的幂:
#Import math Libraryimport math#find the exponential of the specified valueprint(math.exp(65))print(math.exp(-6.89))
定义与用法
math.exp() 方法返回 (Ex),即 E 次 x 幂.
‘E’ 是自然对数系统的基数(约为2.718282),x是传递给它的数字。
语法
math.exp(x)
参数值
| 参数 | 描述 |
|---|---|
| x | 必填。指定的指数 |
技术细节
| 返回值: | 一个 float 值, E 次 x 幂 |
|---|---|
| Python 版本: | 1.6.1 |