]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/y0.3
fuse.4: ffix
[thirdparty/man-pages.git] / man3 / y0.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
4 .\"
5 .\" %%%LICENSE_START(VERBATIM)
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date. The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein. The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" %%%LICENSE_END
26 .\"
27 .\" References consulted:
28 .\" Linux libc source code
29 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
30 .\" 386BSD man pages
31 .\" Modified Sat Jul 24 19:08:17 1993 by Rik Faith (faith@cs.unc.edu)
32 .\" Modified 2002-08-25, aeb
33 .\" Modified 2004-11-12 as per suggestion by Fabian Kreutz/AEB
34 .\" 2008-07-24, mtk, created this page, based on material from j0.3.
35 .\"
36 .TH Y0 3 2017-09-15 "" "Linux Programmer's Manual"
37 .SH NAME
38 y0, y0f, y0l, y1, y1f, y1l, yn, ynf, ynl \-
39 Bessel functions of the second kind
40 .SH SYNOPSIS
41 .nf
42 .B #include <math.h>
43 .PP
44 .BI "double y0(double " x );
45 .BI "double y1(double " x );
46 .BI "double yn(int " n ", double " x );
47 .PP
48 .BI "float y0f(float " x );
49 .BI "float y1f(float " x );
50 .BI "float ynf(int " n ", float " x );
51 .PP
52 .BI "long double y0l(long double " x );
53 .BI "long double y1l(long double " x );
54 .BI "long double ynl(int " n ", long double " x );
55 .fi
56 .PP
57 Link with \fI\-lm\fP.
58 .PP
59 .in -4n
60 Feature Test Macro Requirements for glibc (see
61 .BR feature_test_macros (7)):
62 .in
63 .PP
64 .ad l
65 .BR y0 (),
66 .BR y1 (),
67 .BR yn ():
68 .RS 4
69 _XOPEN_SOURCE
70 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
71 || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
72 .RE
73 .br
74 .BR y0f (),
75 .BR y0l (),
76 .BR y1f (),
77 .BR y1l (),
78 .BR ynf (),
79 .BR ynl ():
80 .RS 4
81 _XOPEN_SOURCE \ >=\ 600
82 || (_ISOC99_SOURCE && _XOPEN_SOURCE)
83 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
84 || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
85 .RE
86 .ad b
87 .SH DESCRIPTION
88 .PP
89 The
90 .BR y0 ()
91 and
92 .BR y1 ()
93 functions return Bessel functions of
94 .I x
95 of the second kind of orders 0 and 1, respectively.
96 The
97 .BR yn ()
98 function
99 returns the Bessel function of
100 .I x
101 of the second kind of order
102 .IR n .
103 .PP
104 The value of
105 .I x
106 must be positive.
107 .PP
108 The
109 .BR y0f (),
110 .BR y1f (),
111 and
112 .BR ynf ()
113 functions are versions that take and return
114 .I float
115 values.
116 The
117 .BR y0l (),
118 .BR y1l (),
119 and
120 .BR ynl ()
121 functions are versions that take and return
122 .I "long double"
123 values.
124 .SH RETURN VALUE
125 On success, these functions return the appropriate
126 Bessel value of the second kind for
127 .IR x .
128 .PP
129 If
130 .I x
131 is a NaN, a NaN is returned.
132 .PP
133 If
134 .I x
135 is negative,
136 a domain error occurs,
137 and the functions return
138 .RB - HUGE_VAL ,
139 .RB - HUGE_VALF ,
140 or
141 .RB - HUGE_VALL ,
142 respectively.
143 (POSIX.1-2001 also allows a NaN return for this case.)
144 .PP
145 If
146 .I x
147 is 0.0,
148 a pole error occurs,
149 and the functions return
150 .RB - HUGE_VAL ,
151 .RB - HUGE_VALF ,
152 or
153 .RB - HUGE_VALL ,
154 respectively.
155 .PP
156 If the result underflows,
157 a range error occurs,
158 and the functions return 0.0
159 .PP
160 If the result overflows,
161 a range error occurs,
162 and the functions return
163 .RB - HUGE_VAL ,
164 .RB - HUGE_VALF ,
165 or
166 .RB - HUGE_VALL ,
167 respectively.
168 (POSIX.1-2001 also allows a 0.0 return for this case.)
169 .SH ERRORS
170 See
171 .BR math_error (7)
172 for information on how to determine whether an error has occurred
173 when calling these functions.
174 .PP
175 The following errors can occur:
176 .TP
177 Domain error: \fIx\fP is negative
178 .I errno
179 is set to
180 .BR EDOM .
181 An invalid floating-point exception
182 .RB ( FE_INVALID )
183 is raised.
184 .TP
185 Pole error: \fIx\fP is 0.0
186 .\" Before POSIX.1-2001 TC2, this was (inconsistently) specified
187 .\" as a range error.
188 .I errno
189 is set to
190 .\" FIXME . y0(0.0) gives EDOM
191 .BR ERANGE
192 (but see BUGS).
193 No
194 .B FE_DIVBYZERO
195 exception is returned by
196 .BR fetestexcept (3)
197 for this case.
198 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6808
199 .TP
200 Range error: result underflow
201 .\" e.g., y0(1e33) on glibc 2.8/x86-32
202 .I errno
203 is set to
204 .BR ERANGE .
205 .\" An underflow floating-point exception
206 .\" .RB ( FE_UNDERFLOW )
207 .\" is raised.
208 .\" FIXME . Is it intentional that these functions do not use FE_*?
209 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6806
210 No
211 .B FE_UNDERFLOW
212 exception is returned by
213 .BR fetestexcept (3)
214 for this case.
215 .TP
216 Range error: result overflow
217 .\" e.g., yn(10, 1e-40) on glibc 2.8/x86-32
218 .\" .I errno
219 .\" is set to
220 .\" .BR ERANGE .
221 .I errno
222 is not set for this case.
223 .\" FIXME . Is it intentional that errno is not set?
224 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6808
225 An overflow floating-point exception
226 .RB ( FE_OVERFLOW )
227 is raised.
228 .SH ATTRIBUTES
229 For an explanation of the terms used in this section, see
230 .BR attributes (7).
231 .TS
232 allbox;
233 lb lb lb
234 l l l.
235 Interface Attribute Value
236 T{
237 .BR y0 (),
238 .BR y0f (),
239 .BR y0l ()
240 T} Thread safety MT-Safe
241 T{
242 .BR y1 (),
243 .BR y1f (),
244 .BR y1l ()
245 T} Thread safety MT-Safe
246 T{
247 .BR yn (),
248 .BR ynf (),
249 .BR ynl ()
250 T} Thread safety MT-Safe
251 .TE
252 .SH CONFORMING TO
253 The functions returning
254 .I double
255 conform to SVr4, 4.3BSD,
256 POSIX.1-2001, POSIX.1-2008.
257 The others are nonstandard functions that also exist on the BSDs.
258 .SH BUGS
259 On a pole error, these functions set
260 .I errno
261 to
262 .BR EDOM ,
263 instead of
264 .BR ERANGE
265 as POSIX.1-2004 requires.
266 .\" FIXME .
267 .\" Bug raised: http://sourceware.org/bugzilla/show_bug.cgi?id=6807
268 .PP
269 In glibc version 2.3.2 and earlier,
270 .\" FIXME . Actually, 2.3.2 is the earliest test result I have; so yet
271 .\" to confirm if this error occurs only in 2.3.2.
272 these functions do not raise an invalid floating-point exception
273 .RB ( FE_INVALID )
274 when a domain error occurs.
275 .SH SEE ALSO
276 .BR j0 (3)