Pythoncmath.nanj定数_
例
nanjの値を出力します。
#Import cmath Library
import cmath
# Print the value of nan
print (cmath.nanj)
print (type(cmath.nanj))
定義と使用法
cmath.nanj
定数は、複素数nan(数値ではない)値を返します。この値の実数部は0で、虚数部はnanです。
nanj定数は。と同等complex(0.0,float("nan")
です。
構文
cmath.nanj
技術的な詳細
戻り値: | complex 値、nan(数値ではありません) |
---|---|
Pythonバージョン: | 3.6 |