Python/ref cmath log10
来自菜鸟教程
<languages />
Python cmath.log10()方法
例
找出一个以10为底的对数:
#Import cmath Library
import cmath
#print base-10 log value of
complex numbers
print (cmath.log10(2+ 3j))
print (cmath.log10(1+ 2j))
定义和用法
The
cmath.log10()
方法返回以10为底的对数。
有一个分支切面,从0沿负实轴开始,从上方连续。
句法
cmath.log10(x)
参数值
| 参数 | 描述 |
|---|---|
| x | 需要。指定要为其计算以10为底的对数的值。如果值为0或负数,则返回ValueError。如果该值不是数字,则返回TypeError |
技术细节
| 返回值: | A
|
| Python版本: | 1.5 |