Python math.erfc() 方法
实例
打印不同数字的互补误差函数:
# Import math Libraryimport math#Print the complementary error function of a numberprint (math.erfc(0.67))print (math.erfc(1.34))print (math.erfc(-6))
定义与用法
math.erfc() 方法返回数字的互补误差函数。
此方法接受介于 -inf 和 +inf 之间的值,并返回介于 0 和 2 之间的值。
语法
math.erfc(x)
参数值
| 参数 | 描述 |
|---|---|
| x | 必填。 一个需要求互补误差函数的数子 |
技术细节
| 返回值: | 一个 float 值,表示数字的互补误差函数 |
|---|---|
| Python 版本: | 3.2 |