Computes the Gauss error function.
#include <math.h> double erf(double x);
x
The value to compute.
This function is defined as
erf(x) = 2/sqrt(pi) * ( integral from 0 to x of exp(pow(-t, 2)) dt )
This facility may not be available on configurations of the EWL that run on platforms that do not have floating-point math capabilities.
#include <math.h> #include <stdio.h> int main(void) { double g = +10.0; printf("The error function of (%f) = %f.\n", g, erf(g)); return 0; } Output: The error function of (10.000000) = 1.000000.