C examples for math.h:erf
function
<cmath> <ctgmath> <math.h>
Returns the error function value for x.
long double erfl (long double x); long double erf (long double x); double erf (double x); float erff (float x); float erf (float x); double erf (T x);
Parameter | Description |
---|---|
x | Parameter for the error function. |
Error function value for x.
#include <stdio.h> #include <math.h> /* erf */ int main ()/*from www. ja va2s .co m*/ { double param = 1.0; double result = erf (param); printf ("erf (%f) = %f\n", param, result ); return 0; }