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))
定義と使用法
このcmath.log10()
メソッドは、複素数の10を底とする対数を返します。
負の実軸に沿った0から-∞まで、上から連続して1つの分岐カットがあります。
構文
cmath.log10(x)
パラメータ値
Parameter | Description |
---|---|
x | Required. Specifies the value to calculate the base-10 logarithm for. If the value is 0 or a negative number, it returns a ValueError. If the value is not a number, it returns a TypeError |
技術的な詳細
戻り値: | 数値の10を底とする対数を表すcomplex 値 |
---|---|
Pythonバージョン: | 1.5 |