]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/erfc.3
getauxval.3: wfix
[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.\"
c73595c2 26.TH ERFC 3 2015-04-19 "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>
32
33.BI "double erfc(double " x );
34.BI "float erfcf(float " x );
35.BI "long double erfcl(long double " x );
36
37.fi
38Link with \fI\-lm\fP.
39.sp
40.in -4n
41Feature Test Macro Requirements for glibc (see
42.BR feature_test_macros (7)):
43.in
44.sp
45.ad l
46.BR erfc ():
14d23282
MK
47.RS 4
48_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE ||
49_POSIX_C_SOURCE\ >=\ 200112L;
50.br
51or
1521a504 52.I cc\ -std=c99
14d23282 53.RE
1521a504
MK
54.br
55.BR erfcf (),
56.BR erfcl ():
14d23282
MK
57.RS 4
58_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600|| _ISOC99_SOURCE ||
59_POSIX_C_SOURCE\ >=\ 200112L;
60.br
61or
1521a504 62.I cc\ -std=c99
14d23282 63.RE
1521a504
MK
64.ad b
65.SH DESCRIPTION
5600f73a 66These functions return the complementary error function of
1521a504
MK
67.IR x ,
68that is, 1.0 \- erf(x).
69.SH RETURN VALUE
70On success, these functions return the complementary error function of
71.IR x ,
72a value in the range [0,2].
73
74If
75.I x
76is a NaN, a NaN is returned.
77
78If
79.I x
80is +0 or \-0, 1 is returned.
81
82If
83.I x
84is positive infinity,
85+0 is returned.
86
87If
88.I x
89is negative infinity,
90+2 is returned.
91
92If the function result underflows and produces an unrepresentable value,
93the return value is 0.0.
94
95If the function result underflows but produces a representable
96(i.e., subnormal) value,
97.\" e.g., erfc(27) on x86-32
98that value is returned, and
efe294cb 99a range error occurs.
1521a504
MK
100.SH ERRORS
101See
102.BR math_error (7)
103for information on how to determine whether an error has occurred
104when calling these functions.
105.PP
106The following errors can occur:
107.TP
108Range error: result underflow (result is subnormal)
109.\" .I errno
110.\" is set to
111.\" .BR ERANGE .
112An underflow floating-point exception
113.RB ( FE_UNDERFLOW )
114is raised.
115.PP
116These functions do not set
117.IR errno .
118.\" FIXME . Is it intentional that these functions do not set errno?
119.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6785
c3452067 120.SH ATTRIBUTES
825ad4a0
MK
121For an explanation of the terms used in this section, see
122.BR attributes (7).
123.TS
124allbox;
125lbw24 lb lb
126l l l.
127Interface Attribute Value
128T{
c3452067
PH
129.BR erfc (),
130.BR erfcf (),
c3452067 131.BR erfcl ()
825ad4a0
MK
132T} Thread safety MT-Safe
133.TE
47297adb 134.SH CONFORMING TO
9a74e018 135C99, POSIX.1-2001, POSIX.1-2008.
e05e3635 136
1521a504
MK
137The variant returning
138.I double
139also conforms to
140SVr4, 4.3BSD.
141.SH NOTES
142The
f1915e1e
PH
143.BR erfc (),
144.BR erfcf (),
145and
146.BR erfcl ()
1521a504
MK
147functions are provided to avoid the loss accuracy that
148would occur for the calculation 1-erf(x) for large values of
149.IR x
150(for which the value of erf(x) approaches 1).
47297adb 151.SH SEE ALSO
1521a504
MK
152.BR cerf (3),
153.BR erf (3),
154.BR exp (3)