math.erfc()
Anonymous contributor
Published Sep 17, 2024
Contribute to Docs
The math.erfc()
method returns the complementary error function of a number. This method accepts a value between -inf and +inf and returns a floating-point value between 0 and 2.
Syntax
math.erfc(x)
x
: A required parameter that should be a real number.
Example
The following example demonstrates the usage of the math.erfc()
method:
# Import the 'math' libraryimport math# Print the complementary error functions of different numbersprint(math.erfc(0.67))print(math.erfc(1.34))print(math.erfc(-6))
The above example produces the following output:
0.34337229769969490.0580862847416346652.0
Note: If the input value is not a real number, a
TypeError
is raised.
Codebyte Example
Run the following codebyte example to understand how the math.erfc()
method works:
All contributors
- Anonymous contributor
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.