1ERF(3)                     Linux Programmer's Manual                    ERF(3)
2
3
4

NAME

6       erf, erff, erfl, - error function
7

SYNOPSIS

9       #include <math.h>
10
11       double erf(double x);
12       float erff(float x);
13       long double erfl(long double x);
14
15       Link with -lm.
16
17   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
18
19       erf(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE;
20       or cc -std=c99
21       erff(), erfl(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600||
22       _ISOC99_SOURCE; or cc -std=c99
23

DESCRIPTION

25       The erf() function returns the error function of x, defined as
26
27           erf(x) = 2/sqrt(pi)* integral from 0 to x of exp(-t*t) dt
28

RETURN VALUE

30       On  success, these functions return the error function of x, a value in
31       the range [-1, 1].
32
33       If x is a NaN, a NaN is returned.
34
35       If x is +0 (-0), +0 (-0) is returned.
36
37       If x is positive infinity (negative infinity), +1 (-1) is returned.
38
39       If x is subnormal, a range  error  occurs,  and  the  return  value  is
40       2*x/sqrt(pi).
41

ERRORS

43       See  math_error(7) for information on how to determine whether an error
44       has occurred when calling these functions.
45
46       The following errors can occur:
47
48       Range error: result underflow (x is subnormal)
49              An underflow floating-point exception (FE_UNDERFLOW) is raised.
50
51       These functions do not set errno.
52

CONFORMING TO

54       C99, POSIX.1-2001.  The variant returning double also conforms to SVr4,
55       4.3BSD.
56

SEE ALSO

58       cerf(3), erfc(3), exp(3)
59

COLOPHON

61       This  page  is  part of release 3.25 of the Linux man-pages project.  A
62       description of the project, and information about reporting  bugs,  can
63       be found at http://www.kernel.org/doc/man-pages/.
64
65
66
67GNU                               2008-08-05                            ERF(3)
Impressum