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():
20           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE
21               || /* Since glibc 2.19: */ _DEFAULT_SOURCE
22               || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
23       erff(), erfl():
24           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
25               || /* Since glibc 2.19: */ _DEFAULT_SOURCE
26               || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
27

DESCRIPTION

29       These functions return the error function of x, defined as
30
31           erf(x) = 2/sqrt(pi) * integral from 0 to x of exp(-t*t) dt
32

RETURN VALUE

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

ERRORS

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

ATTRIBUTES

58       For  an  explanation  of  the  terms  used   in   this   section,   see
59       attributes(7).
60
61       ┌──────────────────────┬───────────────┬─────────┐
62Interface             Attribute     Value   
63       ├──────────────────────┼───────────────┼─────────┤
64erf(), erff(), erfl() │ Thread safety │ MT-Safe │
65       └──────────────────────┴───────────────┴─────────┘

CONFORMING TO

67       C99, POSIX.1-2001, POSIX.1-2008.
68
69       The variant returning double also conforms to SVr4, 4.3BSD.
70

SEE ALSO

72       cerf(3), erfc(3), exp(3)
73

COLOPHON

75       This  page  is  part of release 5.07 of the Linux man-pages project.  A
76       description of the project, information about reporting bugs,  and  the
77       latest     version     of     this    page,    can    be    found    at
78       https://www.kernel.org/doc/man-pages/.
79
80
81
82GNU                               2017-09-15                            ERF(3)
Impressum