python的math模块中的efrc()方法,可以获取参数指定值的余误差函数值。
erfc(x)
python源码对erfc()方法的介绍:
Complementary error function at x.
参数 | 描述 |
---|---|
x | 必须参数,real number,如int或float等类型 |
提示:如果参数不是real number,python将抛出TypeError。
Python浮点数float类型值。
>>> import math
>>> math.erfc(1)
0.157299207050285
>>> math.erfc(0)
1.0
>>> math.erfc(-2)
1.9953222650189528
>>> math.erfc('3')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: must be real number, not str
全栈编程 / Python库(可向下滚动):
Copyright © 2022-2023 笨鸟工具 x1y1z1.com All Rights Reserved.