cmath – 复数的数学函数
该模块实现了相应CPython模块的子集,如下所述。有关更多信息,请参阅原始CPython文档: cmath.
cmath
模块提供了一些处理复数的基本数学函数。
一、函数#
1.1. cos#
返回z
的余弦。
1.2. exp#
返回z
的指数。
1.3. log#
返回z
的自然对数。分支切割沿负实轴。
1.4. log10#
返回z
的以10为底的对数。分支切割沿负实轴。
1.5. phase#
返回数字“z”的相位,范围(-pi,+ pi)。
1.6. polar#
作为元组返回z
的极性形式。
1.7. rect#
返回模数r
和相位phi
的复数。
1.8. sin#
返回z
的正弦值。
1.9. sqrt#
返回z
的平方根。
二、Constants#
2.1. cmath.e#
自然对数的基础
2.2. cmath.pi#
圆周长与直径的比值
Be the first person to leave a comment!