Python math.exp() 方法
实例
返回'E'的不同数字的幂:
#Import math Library
import math
#find the exponential of the
specified value
print(math.exp(65))
print(math.exp(-6.89))
亲自试一试 »
定义和用法
math.exp() 方法返回 E 的 x 次幂 (Ex)。
'E' 是自然对数系统的底数(大约 2.718282),x 是传递给它的数字。
语法
math.exp(x)
参数值
| 参数 | 描述 |
|---|---|
| x | 必需。指定指数 |
技术细节
| 返回值: | 一个 float 值,代表 'E' 的 x | 次幂
|---|---|
| Python 版本: | 1.6.1 |

