Python math 模块提供了许多对浮点数的数学运算函数。
math 模块下的函数,返回值均为浮点数,除非另有明确说明。
如果你需要计算复数,请使用 cmath 模块中的同名函数。
要使用 math 函数必须先导入:
import math
查看 math 模块中的内容:
math 模块常量
math 模块方法