]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/erfc.3
Many pages: Fix style issues reported by `make lint-groff`
[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.\"
5fbde956 4.\" SPDX-License-Identifier: Linux-man-pages-copyleft
1521a504 5.\"
1d767b55 6.TH ERFC 3 2021-03-22 "GNU" "Linux Programmer's Manual"
1521a504
MK
7.SH NAME
8erfc, erfcf, erfcl \- complementary error function
2af19291
AC
9.SH LIBRARY
10Math library
8fc3b2cf 11.RI ( libm ", " \-lm )
1521a504
MK
12.SH SYNOPSIS
13.nf
14.B #include <math.h>
dbfe9c70 15.PP
1521a504
MK
16.BI "double erfc(double " x );
17.BI "float erfcf(float " x );
18.BI "long double erfcl(long double " x );
1521a504 19.fi
dbfe9c70 20.PP
d39ad78f 21.RS -4
1521a504
MK
22Feature Test Macro Requirements for glibc (see
23.BR feature_test_macros (7)):
d39ad78f 24.RE
68e4db0a 25.PP
1521a504 26.BR erfc ():
9d2adbae 27.nf
5c10d2c5 28 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE
9d2adbae
MK
29 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
30 || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
31.fi
98c9347c 32.PP
1521a504
MK
33.BR erfcf (),
34.BR erfcl ():
9d2adbae 35.nf
5c10d2c5 36 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
9d2adbae
MK
37 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
38 || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
39.fi
1521a504 40.SH DESCRIPTION
5600f73a 41These functions return the complementary error function of
1521a504
MK
42.IR x ,
43that is, 1.0 \- erf(x).
44.SH RETURN VALUE
45On success, these functions return the complementary error function of
46.IR x ,
47a value in the range [0,2].
847e0d88 48.PP
1521a504
MK
49If
50.I x
51is a NaN, a NaN is returned.
847e0d88 52.PP
1521a504
MK
53If
54.I x
55is +0 or \-0, 1 is returned.
847e0d88 56.PP
1521a504
MK
57If
58.I x
59is positive infinity,
60+0 is returned.
847e0d88 61.PP
1521a504
MK
62If
63.I x
64is negative infinity,
65+2 is returned.
847e0d88 66.PP
1521a504
MK
67If the function result underflows and produces an unrepresentable value,
68the return value is 0.0.
847e0d88 69.PP
1521a504
MK
70If the function result underflows but produces a representable
71(i.e., subnormal) value,
72.\" e.g., erfc(27) on x86-32
73that value is returned, and
efe294cb 74a range error occurs.
1521a504
MK
75.SH ERRORS
76See
77.BR math_error (7)
78for information on how to determine whether an error has occurred
79when calling these functions.
80.PP
81The following errors can occur:
82.TP
83Range error: result underflow (result is subnormal)
84.\" .I errno
85.\" is set to
86.\" .BR ERANGE .
87An underflow floating-point exception
88.RB ( FE_UNDERFLOW )
89is raised.
90.PP
91These functions do not set
92.IR errno .
e25000b9
MK
93.\" It is intentional that these functions do not set errno for this case
94.\" see http://sources.redhat.com/bugzilla/show_bug.cgi?id=6785
c3452067 95.SH ATTRIBUTES
825ad4a0
MK
96For an explanation of the terms used in this section, see
97.BR attributes (7).
c466875e
MK
98.ad l
99.nh
825ad4a0
MK
100.TS
101allbox;
c466875e 102lbx lb lb
825ad4a0
MK
103l l l.
104Interface Attribute Value
105T{
c3452067
PH
106.BR erfc (),
107.BR erfcf (),
c3452067 108.BR erfcl ()
825ad4a0
MK
109T} Thread safety MT-Safe
110.TE
c466875e
MK
111.hy
112.ad
113.sp 1
47297adb 114.SH CONFORMING TO
9a74e018 115C99, POSIX.1-2001, POSIX.1-2008.
847e0d88 116.PP
1521a504
MK
117The variant returning
118.I double
119also conforms to
120SVr4, 4.3BSD.
121.SH NOTES
122The
f1915e1e
PH
123.BR erfc (),
124.BR erfcf (),
125and
126.BR erfcl ()
1521a504
MK
127functions are provided to avoid the loss accuracy that
128would occur for the calculation 1-erf(x) for large values of
1ae6b2c7 129.I x
1521a504 130(for which the value of erf(x) approaches 1).
47297adb 131.SH SEE ALSO
1521a504
MK
132.BR cerf (3),
133.BR erf (3),
134.BR exp (3)