]>
Commit | Line | Data |
---|---|---|
1521a504 MK |
1 | .\" Copyright 2008, Linux Foundation, written by Michael Kerrisk |
2 | .\" <mtk.manpages@gmail.com> | |
3 | .\" | |
4 | .\" Permission is granted to make and distribute verbatim copies of this | |
5 | .\" manual provided the copyright notice and this permission notice are | |
6 | .\" preserved on all copies. | |
7 | .\" | |
8 | .\" Permission is granted to copy and distribute modified versions of this | |
9 | .\" manual under the conditions for verbatim copying, provided that the | |
10 | .\" entire resulting derived work is distributed under the terms of a | |
11 | .\" permission notice identical to this one. | |
12 | .\" | |
13 | .\" Since the Linux kernel and libraries are constantly changing, this | |
14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
15 | .\" responsibility for errors or omissions, or for damages resulting from | |
16 | .\" the use of the information contained herein. The author(s) may not | |
17 | .\" have taken the same level of care in the production of this manual, | |
18 | .\" which is licensed free of charge, as they might when working | |
19 | .\" professionally. | |
20 | .\" | |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by | |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
23 | .\" | |
50831f9b | 24 | .TH ERFC 3 2010-09-20 "GNU" "Linux Programmer's Manual" |
1521a504 MK |
25 | .SH NAME |
26 | erfc, erfcf, erfcl \- complementary error function | |
27 | .SH SYNOPSIS | |
28 | .nf | |
29 | .B #include <math.h> | |
30 | ||
31 | .BI "double erfc(double " x ); | |
32 | .BI "float erfcf(float " x ); | |
33 | .BI "long double erfcl(long double " x ); | |
34 | ||
35 | .fi | |
36 | Link with \fI\-lm\fP. | |
37 | .sp | |
38 | .in -4n | |
39 | Feature Test Macro Requirements for glibc (see | |
40 | .BR feature_test_macros (7)): | |
41 | .in | |
42 | .sp | |
43 | .ad l | |
44 | .BR erfc (): | |
14d23282 MK |
45 | .RS 4 |
46 | _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE || | |
47 | _POSIX_C_SOURCE\ >=\ 200112L; | |
48 | .br | |
49 | or | |
1521a504 | 50 | .I cc\ -std=c99 |
14d23282 | 51 | .RE |
1521a504 MK |
52 | .br |
53 | .BR erfcf (), | |
54 | .BR erfcl (): | |
14d23282 MK |
55 | .RS 4 |
56 | _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600|| _ISOC99_SOURCE || | |
57 | _POSIX_C_SOURCE\ >=\ 200112L; | |
58 | .br | |
59 | or | |
1521a504 | 60 | .I cc\ -std=c99 |
14d23282 | 61 | .RE |
1521a504 MK |
62 | .ad b |
63 | .SH DESCRIPTION | |
64 | The | |
65 | .BR erfc () | |
66 | function returns the complementary error function of | |
67 | .IR x , | |
68 | that is, 1.0 \- erf(x). | |
69 | .SH RETURN VALUE | |
70 | On success, these functions return the complementary error function of | |
71 | .IR x , | |
72 | a value in the range [0,2]. | |
73 | ||
74 | If | |
75 | .I x | |
76 | is a NaN, a NaN is returned. | |
77 | ||
78 | If | |
79 | .I x | |
80 | is +0 or \-0, 1 is returned. | |
81 | ||
82 | If | |
83 | .I x | |
84 | is positive infinity, | |
85 | +0 is returned. | |
86 | ||
87 | If | |
88 | .I x | |
89 | is negative infinity, | |
90 | +2 is returned. | |
91 | ||
92 | If the function result underflows and produces an unrepresentable value, | |
93 | the return value is 0.0. | |
94 | ||
95 | If the function result underflows but produces a representable | |
96 | (i.e., subnormal) value, | |
97 | .\" e.g., erfc(27) on x86-32 | |
98 | that value is returned, and | |
efe294cb | 99 | a range error occurs. |
1521a504 MK |
100 | .SH ERRORS |
101 | See | |
102 | .BR math_error (7) | |
103 | for information on how to determine whether an error has occurred | |
104 | when calling these functions. | |
105 | .PP | |
106 | The following errors can occur: | |
107 | .TP | |
108 | Range error: result underflow (result is subnormal) | |
109 | .\" .I errno | |
110 | .\" is set to | |
111 | .\" .BR ERANGE . | |
112 | An underflow floating-point exception | |
113 | .RB ( FE_UNDERFLOW ) | |
114 | is raised. | |
115 | .PP | |
116 | These 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 | |
47297adb | 120 | .SH CONFORMING TO |
1521a504 MK |
121 | C99, POSIX.1-2001. |
122 | The variant returning | |
123 | .I double | |
124 | also conforms to | |
125 | SVr4, 4.3BSD. | |
126 | .SH NOTES | |
127 | The | |
128 | .BR erfc () | |
129 | functions are provided to avoid the loss accuracy that | |
130 | would occur for the calculation 1-erf(x) for large values of | |
131 | .IR x | |
132 | (for which the value of erf(x) approaches 1). | |
47297adb | 133 | .SH SEE ALSO |
1521a504 MK |
134 | .BR cerf (3), |
135 | .BR erf (3), | |
136 | .BR exp (3) |