erf(3) Library Functions Manual erf(3) erf, erff, erfl - error function (libm, -lm) #include double erf(double x); float erff(float x); long double erfl(long double x); glibc (. feature_test_macros(7)): erf(): _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE || /* glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE erff(), erfl(): _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || /* glibc 2.19: */ _DEFAULT_SOURCE || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE x, erf(x) = 2/sqrt(pi) * integral from 0 to x of exp(-t*t) dt On success, these functions return the value of the error function of x, a value in the range [-1, 1]. x NaN, NaN. x +0 (-0), +0 (-0). x , +1 -1. x , 2*x/sqrt(pi). math_error(7), , . : Range error: result underflow (x is subnormal) (FE_UNDERFLOW). errno. attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |erf(), erff(), erfl() | | MT-Safe | +----------------------------+----------------------------------------------------------+--------------------------+ C11, POSIX.1-2008. C99, POSIX.1-2001. , double, SVr4, 4.3BSD. cerf(3), erfc(3), exp(3) () Azamat Hackimov , Yuri Kozlov , Kirill Rekhov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.15 17 2025 . erf(3)