]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/erfc.3
erf.3, erfc.3: srcfix: Clear an obsolete FIXME
[thirdparty/man-pages.git] / man3 / erfc.3
CommitLineData
1521a504
MK
1.\" Copyright 2008, Linux Foundation, written by Michael Kerrisk
2.\" <mtk.manpages@gmail.com>
3.\"
93015253 4.\" %%%LICENSE_START(VERBATIM)
1521a504
MK
5.\" Permission is granted to make and distribute verbatim copies of this
6.\" manual provided the copyright notice and this permission notice are
7.\" preserved on all copies.
8.\"
9.\" Permission is granted to copy and distribute modified versions of this
10.\" manual under the conditions for verbatim copying, provided that the
11.\" entire resulting derived work is distributed under the terms of a
12.\" permission notice identical to this one.
13.\"
14.\" Since the Linux kernel and libraries are constantly changing, this
15.\" manual page may be incorrect or out-of-date. The author(s) assume no
16.\" responsibility for errors or omissions, or for damages resulting from
17.\" the use of the information contained herein. The author(s) may not
18.\" have taken the same level of care in the production of this manual,
19.\" which is licensed free of charge, as they might when working
20.\" professionally.
21.\"
22.\" Formatted or processed versions of this manual, if unaccompanied by
23.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 24.\" %%%LICENSE_END
1521a504 25.\"
4b8c67d9 26.TH ERFC 3 2017-09-15 "GNU" "Linux Programmer's Manual"
1521a504
MK
27.SH NAME
28erfc, erfcf, erfcl \- complementary error function
29.SH SYNOPSIS
30.nf
31.B #include <math.h>
dbfe9c70 32.PP
1521a504
MK
33.BI "double erfc(double " x );
34.BI "float erfcf(float " x );
35.BI "long double erfcl(long double " x );
1521a504 36.fi
dbfe9c70 37.PP
1521a504 38Link with \fI\-lm\fP.
68e4db0a 39.PP
1521a504
MK
40.in -4n
41Feature Test Macro Requirements for glibc (see
42.BR feature_test_macros (7)):
43.in
68e4db0a 44.PP
1521a504
MK
45.ad l
46.BR erfc ():
14d23282 47.RS 4
636ed4d5
MK
48_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L || _XOPEN_SOURCE
49 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
50 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
14d23282 51.RE
1521a504
MK
52.br
53.BR erfcf (),
54.BR erfcl ():
14d23282 55.RS 4
636ed4d5
MK
56_ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
57 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
58 || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
14d23282 59.RE
1521a504
MK
60.ad b
61.SH DESCRIPTION
5600f73a 62These functions return the complementary error function of
1521a504
MK
63.IR x ,
64that is, 1.0 \- erf(x).
65.SH RETURN VALUE
66On success, these functions return the complementary error function of
67.IR x ,
68a value in the range [0,2].
847e0d88 69.PP
1521a504
MK
70If
71.I x
72is a NaN, a NaN is returned.
847e0d88 73.PP
1521a504
MK
74If
75.I x
76is +0 or \-0, 1 is returned.
847e0d88 77.PP
1521a504
MK
78If
79.I x
80is positive infinity,
81+0 is returned.
847e0d88 82.PP
1521a504
MK
83If
84.I x
85is negative infinity,
86+2 is returned.
847e0d88 87.PP
1521a504
MK
88If the function result underflows and produces an unrepresentable value,
89the return value is 0.0.
847e0d88 90.PP
1521a504
MK
91If the function result underflows but produces a representable
92(i.e., subnormal) value,
93.\" e.g., erfc(27) on x86-32
94that value is returned, and
efe294cb 95a range error occurs.
1521a504
MK
96.SH ERRORS
97See
98.BR math_error (7)
99for information on how to determine whether an error has occurred
100when calling these functions.
101.PP
102The following errors can occur:
103.TP
104Range error: result underflow (result is subnormal)
105.\" .I errno
106.\" is set to
107.\" .BR ERANGE .
108An underflow floating-point exception
109.RB ( FE_UNDERFLOW )
110is raised.
111.PP
112These functions do not set
113.IR errno .
e25000b9
MK
114.\" It is intentional that these functions do not set errno for this case
115.\" see http://sources.redhat.com/bugzilla/show_bug.cgi?id=6785
c3452067 116.SH ATTRIBUTES
825ad4a0
MK
117For an explanation of the terms used in this section, see
118.BR attributes (7).
119.TS
120allbox;
121lbw24 lb lb
122l l l.
123Interface Attribute Value
124T{
c3452067
PH
125.BR erfc (),
126.BR erfcf (),
c3452067 127.BR erfcl ()
825ad4a0
MK
128T} Thread safety MT-Safe
129.TE
47297adb 130.SH CONFORMING TO
9a74e018 131C99, POSIX.1-2001, POSIX.1-2008.
847e0d88 132.PP
1521a504
MK
133The variant returning
134.I double
135also conforms to
136SVr4, 4.3BSD.
137.SH NOTES
138The
f1915e1e
PH
139.BR erfc (),
140.BR erfcf (),
141and
142.BR erfcl ()
1521a504
MK
143functions are provided to avoid the loss accuracy that
144would occur for the calculation 1-erf(x) for large values of
145.IR x
146(for which the value of erf(x) approaches 1).
47297adb 147.SH SEE ALSO
1521a504
MK
148.BR cerf (3),
149.BR erf (3),
150.BR exp (3)