2 .\" Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
7 .TH erfc 3 (date) "Linux man-pages (unreleased)"
9 erfc, erfcf, erfcl \- complementary error function
12 .RI ( libm ", " \-lm )
17 .BI "double erfc(double " x );
18 .BI "float erfcf(float " x );
19 .BI "long double erfcl(long double " x );
23 Feature Test Macro Requirements for glibc (see
24 .BR feature_test_macros (7)):
29 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE
30 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
31 || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
37 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
38 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
39 || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
42 These functions return the complementary error function of
44 that is, 1.0 \- erf(x).
46 On success, these functions return the complementary error function of
48 a value in the range [0,2].
52 is a NaN, a NaN is returned.
56 is +0 or \-0, 1 is returned.
68 If the function result underflows and produces an unrepresentable value,
69 the return value is 0.0.
71 If the function result underflows but produces a representable
72 (i.e., subnormal) value,
73 .\" e.g., erfc(27) on x86-32
74 that value is returned, and
79 for information on how to determine whether an error has occurred
80 when calling these functions.
82 The following errors can occur:
84 Range error: result underflow (result is subnormal)
88 An underflow floating-point exception
92 These functions do not set
94 .\" It is intentional that these functions do not set errno for this case
95 .\" see https://www.sourceware.org/bugzilla/show_bug.cgi?id=6785
97 For an explanation of the terms used in this section, see
103 Interface Attribute Value
110 T} Thread safety MT-Safe
118 The variant returning
128 functions are provided to avoid the loss accuracy that
129 would occur for the calculation 1-erf(x) for large values of
131 (for which the value of erf(x) approaches 1).