]>
Commit | Line | Data |
---|---|---|
a1eaacb1 | 1 | '\" t |
17d2ffdf MK |
2 | .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) |
3 | .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk | |
4 | .\" <mtk.manpages@gmail.com> | |
5 | .\" | |
5fbde956 | 6 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
17d2ffdf MK |
7 | .\" |
8 | .\" References consulted: | |
9 | .\" Linux libc source code | |
10 | .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) | |
11 | .\" 386BSD man pages | |
12 | .\" Modified Sat Jul 24 19:08:17 1993 by Rik Faith (faith@cs.unc.edu) | |
13 | .\" Modified 2002-08-25, aeb | |
14 | .\" Modified 2004-11-12 as per suggestion by Fabian Kreutz/AEB | |
15 | .\" 2008-07-24, mtk, created this page, based on material from j0.3. | |
16 | .\" | |
4c1c5274 | 17 | .TH y0 3 (date) "Linux man-pages (unreleased)" |
17d2ffdf MK |
18 | .SH NAME |
19 | y0, y0f, y0l, y1, y1f, y1l, yn, ynf, ynl \- | |
20 | Bessel functions of the second kind | |
a0fab3ef AC |
21 | .SH LIBRARY |
22 | Math library | |
8fc3b2cf | 23 | .RI ( libm ", " \-lm ) |
17d2ffdf MK |
24 | .SH SYNOPSIS |
25 | .nf | |
26 | .B #include <math.h> | |
68e4db0a | 27 | .PP |
17d2ffdf | 28 | .BI "double y0(double " x ); |
17d2ffdf | 29 | .BI "double y1(double " x ); |
17d2ffdf | 30 | .BI "double yn(int " n ", double " x ); |
68e4db0a | 31 | .PP |
17d2ffdf | 32 | .BI "float y0f(float " x ); |
17d2ffdf | 33 | .BI "float y1f(float " x ); |
17d2ffdf | 34 | .BI "float ynf(int " n ", float " x ); |
68e4db0a | 35 | .PP |
17d2ffdf | 36 | .BI "long double y0l(long double " x ); |
17d2ffdf | 37 | .BI "long double y1l(long double " x ); |
17d2ffdf MK |
38 | .BI "long double ynl(int " n ", long double " x ); |
39 | .fi | |
68e4db0a | 40 | .PP |
d39ad78f | 41 | .RS -4 |
17d2ffdf MK |
42 | Feature Test Macro Requirements for glibc (see |
43 | .BR feature_test_macros (7)): | |
d39ad78f | 44 | .RE |
68e4db0a | 45 | .PP |
17d2ffdf MK |
46 | .BR y0 (), |
47 | .BR y1 (), | |
48 | .BR yn (): | |
9d2adbae MK |
49 | .nf |
50 | _XOPEN_SOURCE | |
51 | || /* Since glibc 2.19: */ _DEFAULT_SOURCE | |
75c018a1 | 52 | || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE |
9d2adbae | 53 | .fi |
98c9347c | 54 | .PP |
17d2ffdf MK |
55 | .BR y0f (), |
56 | .BR y0l (), | |
57 | .BR y1f (), | |
58 | .BR y1l (), | |
59 | .BR ynf (), | |
60 | .BR ynl (): | |
9d2adbae | 61 | .nf |
5c10d2c5 | 62 | _XOPEN_SOURCE >= 600 |
9d2adbae MK |
63 | || (_ISOC99_SOURCE && _XOPEN_SOURCE) |
64 | || /* Since glibc 2.19: */ _DEFAULT_SOURCE | |
75c018a1 | 65 | || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE |
9d2adbae | 66 | .fi |
17d2ffdf | 67 | .SH DESCRIPTION |
17d2ffdf MK |
68 | The |
69 | .BR y0 () | |
70 | and | |
71 | .BR y1 () | |
c6fa0841 MK |
72 | functions return Bessel functions of |
73 | .I x | |
17d2ffdf MK |
74 | of the second kind of orders 0 and 1, respectively. |
75 | The | |
76 | .BR yn () | |
77 | function | |
c6fa0841 MK |
78 | returns the Bessel function of |
79 | .I x | |
80 | of the second kind of order | |
81 | .IR n . | |
17d2ffdf | 82 | .PP |
c6fa0841 MK |
83 | The value of |
84 | .I x | |
85 | must be positive. | |
17d2ffdf MK |
86 | .PP |
87 | The | |
80017421 MK |
88 | .BR y0f (), |
89 | .BR y1f (), | |
90 | and | |
91 | .BR ynf () | |
92 | functions are versions that take and return | |
17d2ffdf | 93 | .I float |
80017421 MK |
94 | values. |
95 | The | |
96 | .BR y0l (), | |
97 | .BR y1l (), | |
17d2ffdf | 98 | and |
80017421 MK |
99 | .BR ynl () |
100 | functions are versions that take and return | |
17d2ffdf | 101 | .I "long double" |
80017421 | 102 | values. |
17d2ffdf MK |
103 | .SH RETURN VALUE |
104 | On success, these functions return the appropriate | |
105 | Bessel value of the second kind for | |
106 | .IR x . | |
847e0d88 | 107 | .PP |
17d2ffdf MK |
108 | If |
109 | .I x | |
110 | is a NaN, a NaN is returned. | |
847e0d88 | 111 | .PP |
17d2ffdf MK |
112 | If |
113 | .I x | |
114 | is negative, | |
efe294cb | 115 | a domain error occurs, |
17d2ffdf | 116 | and the functions return |
cd415e73 MK |
117 | .RB \- HUGE_VAL , |
118 | .RB \- HUGE_VALF , | |
17d2ffdf | 119 | or |
cd415e73 | 120 | .RB \- HUGE_VALL , |
17d2ffdf MK |
121 | respectively. |
122 | (POSIX.1-2001 also allows a NaN return for this case.) | |
847e0d88 | 123 | .PP |
17d2ffdf MK |
124 | If |
125 | .I x | |
126 | is 0.0, | |
efe294cb | 127 | a pole error occurs, |
17d2ffdf | 128 | and the functions return |
cd415e73 MK |
129 | .RB \- HUGE_VAL , |
130 | .RB \- HUGE_VALF , | |
17d2ffdf | 131 | or |
cd415e73 | 132 | .RB \- HUGE_VALL , |
17d2ffdf | 133 | respectively. |
847e0d88 | 134 | .PP |
17d2ffdf | 135 | If the result underflows, |
efe294cb | 136 | a range error occurs, |
17d2ffdf | 137 | and the functions return 0.0 |
847e0d88 | 138 | .PP |
17d2ffdf | 139 | If the result overflows, |
efe294cb | 140 | a range error occurs, |
17d2ffdf | 141 | and the functions return |
cd415e73 MK |
142 | .RB \- HUGE_VAL , |
143 | .RB \- HUGE_VALF , | |
17d2ffdf | 144 | or |
cd415e73 | 145 | .RB \- HUGE_VALL , |
17d2ffdf MK |
146 | respectively. |
147 | (POSIX.1-2001 also allows a 0.0 return for this case.) | |
148 | .SH ERRORS | |
149 | See | |
150 | .BR math_error (7) | |
151 | for information on how to determine whether an error has occurred | |
152 | when calling these functions. | |
153 | .PP | |
154 | The following errors can occur: | |
155 | .TP | |
156 | Domain error: \fIx\fP is negative | |
157 | .I errno | |
158 | is set to | |
159 | .BR EDOM . | |
160 | An invalid floating-point exception | |
161 | .RB ( FE_INVALID ) | |
162 | is raised. | |
163 | .TP | |
164 | Pole error: \fIx\fP is 0.0 | |
165 | .\" Before POSIX.1-2001 TC2, this was (inconsistently) specified | |
166 | .\" as a range error. | |
167 | .I errno | |
168 | is set to | |
1ae6b2c7 | 169 | .B ERANGE |
696b65a5 | 170 | and an |
17d2ffdf | 171 | .B FE_DIVBYZERO |
696b65a5 MK |
172 | exception is raised |
173 | (but see BUGS). | |
17d2ffdf MK |
174 | .TP |
175 | Range error: result underflow | |
176 | .\" e.g., y0(1e33) on glibc 2.8/x86-32 | |
177 | .I errno | |
178 | is set to | |
179 | .BR ERANGE . | |
17d2ffdf MK |
180 | No |
181 | .B FE_UNDERFLOW | |
182 | exception is returned by | |
c2e0ff42 MK |
183 | .\" This is intended behavior |
184 | .\" See http://sources.redhat.com/bugzilla/show_bug.cgi?id=6806 | |
17d2ffdf MK |
185 | .BR fetestexcept (3) |
186 | for this case. | |
187 | .TP | |
188 | Range error: result overflow | |
189 | .\" e.g., yn(10, 1e-40) on glibc 2.8/x86-32 | |
17d2ffdf | 190 | .I errno |
e1403777 | 191 | is set to |
1ae6b2c7 | 192 | .B ERANGE |
e1403777 | 193 | (but see BUGS). |
17d2ffdf MK |
194 | An overflow floating-point exception |
195 | .RB ( FE_OVERFLOW ) | |
196 | is raised. | |
2d3e3a67 MS |
197 | .SH ATTRIBUTES |
198 | For an explanation of the terms used in this section, see | |
199 | .BR attributes (7). | |
c466875e MK |
200 | .ad l |
201 | .nh | |
2d3e3a67 MS |
202 | .TS |
203 | allbox; | |
c466875e | 204 | lbx lb lb |
2d3e3a67 MS |
205 | l l l. |
206 | Interface Attribute Value | |
207 | T{ | |
208 | .BR y0 (), | |
209 | .BR y0f (), | |
210 | .BR y0l () | |
211 | T} Thread safety MT-Safe | |
212 | T{ | |
213 | .BR y1 (), | |
214 | .BR y1f (), | |
215 | .BR y1l () | |
216 | T} Thread safety MT-Safe | |
217 | T{ | |
218 | .BR yn (), | |
219 | .BR ynf (), | |
220 | .BR ynl () | |
221 | T} Thread safety MT-Safe | |
222 | .TE | |
c466875e MK |
223 | .hy |
224 | .ad | |
225 | .sp 1 | |
3113c7f3 | 226 | .SH STANDARDS |
17d2ffdf MK |
227 | The functions returning |
228 | .I double | |
229 | conform to SVr4, 4.3BSD, | |
9a0216ac | 230 | POSIX.1-2001, POSIX.1-2008. |
c8f2dd47 | 231 | The others are nonstandard functions that also exist on the BSDs. |
17d2ffdf | 232 | .SH BUGS |
696b65a5 MK |
233 | Before glibc 2.19, |
234 | .\" http://sourceware.org/bugzilla/show_bug.cgi?id=6807 | |
235 | these functions misdiagnosed pole errors: | |
17d2ffdf | 236 | .I errno |
696b65a5 | 237 | was set to |
17d2ffdf MK |
238 | .BR EDOM , |
239 | instead of | |
1ae6b2c7 | 240 | .B ERANGE |
696b65a5 MK |
241 | and no |
242 | .B FE_DIVBYZERO | |
243 | exception was raised. | |
847e0d88 | 244 | .PP |
e1403777 MK |
245 | Before glibc 2.17, |
246 | .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6808 | |
247 | did not set | |
248 | .I errno | |
249 | for "range error: result underflow". | |
250 | .PP | |
b324e17d | 251 | In glibc 2.3.2 and earlier, |
14b81bcf | 252 | .\" Actually, 2.3.2 is the earliest test result I have; so yet |
b324e17d | 253 | .\" to confirm if this error occurs only in glibc 2.3.2. |
b71168c2 MK |
254 | these functions do not raise an invalid floating-point exception |
255 | .RB ( FE_INVALID ) | |