Python math.erfc() メソッド
Python math.erfc(x)メソッドは、x における相補誤差関数を返します。
math.erfc(x)メソッドは -inf と +inf の間の値を受け入れ、-1 から +1 の間の値を返します。
Python バージョン: 3.2
構文
math.erfc() メソッドの構文は次のとおりです:
math.erfc(x)
パラメータの説明:
- x-- 必須、数値。x が数値でない場合、TypeError を返します。
戻り値
数値の相補誤差関数を表す浮動小数点値。
例
次の例では、数値の相補誤差関数を示しています:
例
# math パッケージをインポート
import math
# さまざまな数値の相補誤差関数を出力
print (math.erfc(0.67))
print (math.erfc(1.34))
print (math.erfc(-6))
import math
# さまざまな数値の相補誤差関数を出力
print (math.erfc(0.67))
print (math.erfc(1.34))
print (math.erfc(-6))
出力結果:
0.34337229769969496 0.05808628474163466 2.0その他の拡張
Python math モジュール