Python math.erfc() Method
Example
Calculate the complementary error function of different numbers:
# Import math Library
import math
# Print the complementary error function of
different
numbers
print (math.erfc(0.67))
print (math.erfc(1.34))
print
(math.erfc(-6))
Try it Yourself »
Definition and Usage
The math.erfc()
method returns the complementary error function of a number.
Error functions usually occur in probability, statistics and partial differential equation describing diffusion.
The math.erf()
method accepts a value range between [-inf, inf] and returns error function in between [0, 2].
The relation between complementary error function and error function can be defined as, erfc(x) = 1- erf(x)
.
Syntax
math.erfc(x)
Parameter Values
Parameter | Description |
---|---|
x | Required. The number to find the complementary error function of |
Technical Details
Return Value: | A float value, representing the complementary error function of a number |
---|---|
Python Version: | 3.2 |