math.erf

Full name
math.erf
Library
math
Syntax

math.erf(x)

Description

The math.erf function returns the value of the error function (also called the Gauss error function ) for a given x value.

The error function is given by the following expression:

Función error de Gauss

And its graph is the following:

Gráfica de la función error de Gauss
Parameters
  • x: Value for which we want to obtain the Gauss error function.
Result

The math.erf function returns a real number.

Examples

We can obtain the value of the Gauss error function for the point x = 0.5 with the following code:

math.erf(0.5)
0.5204998778130465
Submitted by admin on Wed, 02/10/2021 - 07:14