math.erf()
Anonymous contributor
Published Aug 24, 2024
Contribute to Docs
The math.erf()
function returns the error function of a number.
Syntax
math.erf(n)
n
: A real number for which the error function is to be computed.
The math.erf()
function accepts any real number from negative infinity to positive infinity as input and returns a value between -1 and 1, representing the error function of that number.
Example
In the example below, math.erf()
returns the error function of 1
:
import mathprint(math.erf(1))
The above code gives the following output:
0.8427007929497149
Codebyte Example
Run the following example that uses the math.erf()
function to understand its working:
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.