go math.Erf()
Erf()方法语法
func Erf(x float64) float64
go源码对Erf()方法的介绍:
Erf returns the error function of x.
Special cases are:
Erf(+Inf) = 1
Erf(-Inf) = -1
Erf(NaN) = NaN
golang标准库math.Erf()方法,返回参数x的误差函数。除此之外,Erf(+Inf) = 1;Erf(-Inf) = -1;Erf(NaN) = NaN。
math.Erf()方法实例代码
func main() {
erf := math.Erf(0.5)
fmt.Println(erf)
}
运行go文件,得到输出:
0.5204998778130465