1ERF(3P)                    POSIX Programmer's Manual                   ERF(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       erf, erff, erfl - error functions
13

SYNOPSIS

15       #include <math.h>
16
17       double erf(double x);
18       float erff(float x);
19       long double erfl(long double x);
20
21

DESCRIPTION

23       These functions shall compute the error function of their  argument  x,
24       defined as:
25
26       An  application  wishing to check for error situations should set errno
27       to zero and  call  feclearexcept(FE_ALL_EXCEPT)  before  calling  these
28       functions.   On return, if errno is non-zero or fetestexcept(FE_INVALID
29       | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is non-zero, an error  has
30       occurred.
31

RETURN VALUE

33       Upon  successful  completion, these functions shall return the value of
34       the error function.
35
36       If x is NaN, a NaN shall be returned.
37
38       If x is ±0, ±0 shall be returned.
39
40       If x is ±Inf, ±1 shall be returned.
41
42       If x is subnormal, a range error may occur, and 2 * x/ sqrt(pi)  should
43       be returned.
44

ERRORS

46       These functions may fail if:
47
48       Range Error
49              The result underflows.
50
51       If  the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
52       then errno  shall  be  set  to  [ERANGE].  If  the  integer  expression
53       (math_errhandling  &  MATH_ERREXCEPT)  is  non-zero, then the underflow
54       floating-point exception shall be raised.
55
56
57       The following sections are informative.
58

EXAMPLES

60       None.
61

APPLICATION USAGE

63       Underflow occurs when |x| < DBL_MIN * ( sqrt(pi)/2).
64
65       On  error,  the  expressions  (math_errhandling   &   MATH_ERRNO)   and
66       (math_errhandling  & MATH_ERREXCEPT) are independent of each other, but
67       at least one of them must be non-zero.
68

RATIONALE

70       None.
71

FUTURE DIRECTIONS

73       None.
74

SEE ALSO

76       erfc(), feclearexcept(), fetestexcept(), isnan(), the Base  Definitions
77       volume of IEEE Std 1003.1-2001, Section 4.18, Treatment of Error Condi‐
78       tions for Mathematical Functions, <math.h>
79
81       Portions of this text are reprinted and reproduced in  electronic  form
82       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
83       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
84       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
85       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
86       event of any discrepancy between this version and the original IEEE and
87       The Open Group Standard, the original IEEE and The Open Group  Standard
88       is  the  referee document. The original Standard can be obtained online
89       at http://www.opengroup.org/unix/online.html .
90
91
92
93IEEE/The Open Group                  2003                              ERF(3P)
Impressum