cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> extern float erff (float x); extern double erf (double x); extern long double erfl (long double x); extern __float80 erfw (__float80 x); extern __float128 erfq (__float128 x); extern long_long_double erfll (long_long_double x); extern decimal_float erfdf (decimal_float x); extern decimal_double erfd (decimal_double x); extern decimal_long_double erfdl (decimal_long_double x); extern decimal_long_long_double erfdll (decimal_long_long_double x);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
This is the area under the scaled normal curve from 0 to x.erf(x) = (2/sqrt(pi)) integral(t = 0:x) exp(-t**2) dt = 1 - erfc(x)
Caution: While the two functions share the simple relation erf(x) + erfc(x) = 1, it is only accurate to compute the larger from the smaller.