Python math.erf() 方法
例如:
不同数字的打印错误功能:
# Import math Library
import math
# 打印错误功能,不同的数字
print (math.erf(0.67))
print (math.erf(1.34))
print (math.erf(-6))1、定义和用法
math.erf()方法返回数字的误差函数。
此方法接受-inf和+inf之间的值,并返回-1至+ 1之间的值。
2、调用语法
math.erf(x)3、参数说明
| 参数 | 描述 | 
| x | 必需的参数, 查找错误函数的数字 | 
4、方法说明
| 返回值: | 
 | 
| Python Version: | 3.2 | 
5、示例代码
例如:
计算相同数字的正负的数学误差函数:
print (math.erf(1.28))
print (math.erf(-1.28))