Man Linux: Main Page and Category List

erf, erff, erfl, - error function

#include<math.h>doubleerf(doublex);floaterff(floatx);longdoubleerfl(longdoublex);Link with-lm. Feature Test Macro Requirements for glibc (seefeature_test_macros(7)):erf(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE; orcc-std=c99erff(),erfl(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600|| _ISOC99_SOURCE; orcc-std=c99

Theerf() function returns the error function ofx, defined as erf(x) = 2/sqrt(pi)* integral from 0 to x of exp(-t*t) dt

On success, these functions return the error function ofx, a value in the range [-1, 1]. Ifxis a NaN, a NaN is returned. Ifxis +0 (-0), +0 (-0) is returned. Ifxis positive infinity (negative infinity), +1 (-1) is returned. Ifxis subnormal, a range error occurs, and the return value is 2*x/sqrt(pi).

Seemath_error(7) for information on how to determine whether an error has occurred when calling these functions. The following errors can occur: Range error: result underflow (xis subnormal) An underflow floating-point exception (FE_UNDERFLOW) is raised. These functions do not seterrno.

C99, POSIX.1-2001. The variant returningdoublealso conforms to SVr4, 4.3BSD.

cerf(3),erfc(3),exp(3)

This page is part of release 3.24 of the Linuxman-pagesproject. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.