1ERFC(3P)                   POSIX Programmer's Manual                  ERFC(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       erfc, erfcf, erfcl - complementary error functions
13

SYNOPSIS

15       #include <math.h>
16
17       double erfc(double x);
18       float erfcf(float x);
19       long double erfcl(long double x);
20
21

DESCRIPTION

23       These functions shall compute the complementary error  function  1.0  -
24       erf(x).
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 complementary error function.
35
36       If the correct value would cause underflow and is not representable,  a
37       range error may occur and  either 0.0 (if representable), or  an imple‐
38       mentation-defined value shall be returned.
39
40       If x is NaN, a NaN shall be returned.
41
42       If x is ±0, +1 shall be returned.
43
44       If x is -Inf, +2 shall be returned.
45
46       If x is +Inf, +0 shall be returned.
47
48       If the correct value would cause  underflow  and  is  representable,  a
49       range error may occur and the correct value shall be returned.
50

ERRORS

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

EXAMPLES

66       None.
67

APPLICATION USAGE

69       The erfc() function is provided because of the extreme loss of relative
70       accuracy if erf(x) is called for large x and the result subtracted from
71       1.0.
72
73       Note for IEEE Std 754-1985 double, 26.55  <  x  implies  erfc(  x)  has
74       underflowed.
75
76       On   error,   the   expressions  (math_errhandling  &  MATH_ERRNO)  and
77       (math_errhandling & MATH_ERREXCEPT) are independent of each other,  but
78       at least one of them must be non-zero.
79

RATIONALE

81       None.
82

FUTURE DIRECTIONS

84       None.
85

SEE ALSO

87       erf(),  feclearexcept(),  fetestexcept(), isnan(), the Base Definitions
88       volume of IEEE Std 1003.1-2001, Section 4.18, Treatment of Error Condi‐
89       tions for Mathematical Functions, <math.h>
90
92       Portions  of  this text are reprinted and reproduced in electronic form
93       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
94       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
95       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
96       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
97       event of any discrepancy between this version and the original IEEE and
98       The  Open Group Standard, the original IEEE and The Open Group Standard
99       is the referee document. The original Standard can be  obtained  online
100       at http://www.opengroup.org/unix/online.html .
101
102
103
104IEEE/The Open Group                  2003                             ERFC(3P)
Impressum