cmath – 复数的数学函数¶
This module implements a subset of the corresponding CPython module,
as described below. For more information, refer to the original
CPython documentation: cmath。
cmath 模块提供一些对复数有效的基本数学函数。
函数¶
- cmath.cos(z)¶
返回
z的余弦。
- cmath.exp(z)¶
返回
z的指数。
- cmath.log(z)¶
返回
z的自然对数。分支切割线沿着负实轴。
- cmath.log10(z)¶
返回以
z以10为底的对数。分支切割线沿着负实轴。
- cmath.phase(z)¶
返回数字
z的相位,范围为(-pi, +pi]。
- cmath.polar(z)¶
以元组返回
z的极坐标形式。
- cmath.rect(r, phi)¶
使用模块
r和相位phi来返回复数。
- cmath.sin(z)¶
返回
z的正弦。
- cmath.sqrt(z)¶
返回
z的平方根。
常量¶
- cmath.e¶
自然对数的底数
- cmath.pi¶
圆周长与直径之比