]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/y0.3
Many pages: Use lowercase for 'glibc'
[thirdparty/man-pages.git] / man3 / y0.3
CommitLineData
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
19y0, y0f, y0l, y1, y1f, y1l, yn, ynf, ynl \-
20Bessel functions of the second kind
a0fab3ef
AC
21.SH LIBRARY
22Math 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
42Feature 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
68The
69.BR y0 ()
70and
71.BR y1 ()
c6fa0841
MK
72functions return Bessel functions of
73.I x
17d2ffdf
MK
74of the second kind of orders 0 and 1, respectively.
75The
76.BR yn ()
77function
c6fa0841
MK
78returns the Bessel function of
79.I x
80of the second kind of order
81.IR n .
17d2ffdf 82.PP
c6fa0841
MK
83The value of
84.I x
85must be positive.
17d2ffdf
MK
86.PP
87The
80017421
MK
88.BR y0f (),
89.BR y1f (),
90and
91.BR ynf ()
92functions are versions that take and return
17d2ffdf 93.I float
80017421
MK
94values.
95The
96.BR y0l (),
97.BR y1l (),
17d2ffdf 98and
80017421
MK
99.BR ynl ()
100functions are versions that take and return
17d2ffdf 101.I "long double"
80017421 102values.
17d2ffdf
MK
103.SH RETURN VALUE
104On success, these functions return the appropriate
105Bessel value of the second kind for
106.IR x .
847e0d88 107.PP
17d2ffdf
MK
108If
109.I x
110is a NaN, a NaN is returned.
847e0d88 111.PP
17d2ffdf
MK
112If
113.I x
114is negative,
efe294cb 115a domain error occurs,
17d2ffdf 116and the functions return
cd415e73
MK
117.RB \- HUGE_VAL ,
118.RB \- HUGE_VALF ,
17d2ffdf 119or
cd415e73 120.RB \- HUGE_VALL ,
17d2ffdf
MK
121respectively.
122(POSIX.1-2001 also allows a NaN return for this case.)
847e0d88 123.PP
17d2ffdf
MK
124If
125.I x
126is 0.0,
efe294cb 127a pole error occurs,
17d2ffdf 128and the functions return
cd415e73
MK
129.RB \- HUGE_VAL ,
130.RB \- HUGE_VALF ,
17d2ffdf 131or
cd415e73 132.RB \- HUGE_VALL ,
17d2ffdf 133respectively.
847e0d88 134.PP
17d2ffdf 135If the result underflows,
efe294cb 136a range error occurs,
17d2ffdf 137and the functions return 0.0
847e0d88 138.PP
17d2ffdf 139If the result overflows,
efe294cb 140a range error occurs,
17d2ffdf 141and the functions return
cd415e73
MK
142.RB \- HUGE_VAL ,
143.RB \- HUGE_VALF ,
17d2ffdf 144or
cd415e73 145.RB \- HUGE_VALL ,
17d2ffdf
MK
146respectively.
147(POSIX.1-2001 also allows a 0.0 return for this case.)
148.SH ERRORS
149See
150.BR math_error (7)
151for information on how to determine whether an error has occurred
152when calling these functions.
153.PP
154The following errors can occur:
155.TP
156Domain error: \fIx\fP is negative
157.I errno
158is set to
159.BR EDOM .
160An invalid floating-point exception
161.RB ( FE_INVALID )
162is raised.
163.TP
164Pole error: \fIx\fP is 0.0
165.\" Before POSIX.1-2001 TC2, this was (inconsistently) specified
166.\" as a range error.
167.I errno
168is set to
1ae6b2c7 169.B ERANGE
696b65a5 170and an
17d2ffdf 171.B FE_DIVBYZERO
696b65a5
MK
172exception is raised
173(but see BUGS).
17d2ffdf
MK
174.TP
175Range error: result underflow
176.\" e.g., y0(1e33) on glibc 2.8/x86-32
177.I errno
178is set to
179.BR ERANGE .
17d2ffdf
MK
180No
181.B FE_UNDERFLOW
182exception 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)
186for this case.
187.TP
188Range error: result overflow
189.\" e.g., yn(10, 1e-40) on glibc 2.8/x86-32
17d2ffdf 190.I errno
e1403777 191is set to
1ae6b2c7 192.B ERANGE
e1403777 193(but see BUGS).
17d2ffdf
MK
194An overflow floating-point exception
195.RB ( FE_OVERFLOW )
196is raised.
2d3e3a67
MS
197.SH ATTRIBUTES
198For 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
203allbox;
c466875e 204lbx lb lb
2d3e3a67
MS
205l l l.
206Interface Attribute Value
207T{
208.BR y0 (),
209.BR y0f (),
210.BR y0l ()
211T} Thread safety MT-Safe
212T{
213.BR y1 (),
214.BR y1f (),
215.BR y1l ()
216T} Thread safety MT-Safe
217T{
218.BR yn (),
219.BR ynf (),
220.BR ynl ()
221T} Thread safety MT-Safe
222.TE
c466875e
MK
223.hy
224.ad
225.sp 1
3113c7f3 226.SH STANDARDS
17d2ffdf
MK
227The functions returning
228.I double
229conform to SVr4, 4.3BSD,
9a0216ac 230POSIX.1-2001, POSIX.1-2008.
c8f2dd47 231The others are nonstandard functions that also exist on the BSDs.
17d2ffdf 232.SH BUGS
696b65a5
MK
233Before glibc 2.19,
234.\" http://sourceware.org/bugzilla/show_bug.cgi?id=6807
235these functions misdiagnosed pole errors:
17d2ffdf 236.I errno
696b65a5 237was set to
17d2ffdf
MK
238.BR EDOM ,
239instead of
1ae6b2c7 240.B ERANGE
696b65a5
MK
241and no
242.B FE_DIVBYZERO
243exception was raised.
847e0d88 244.PP
e1403777
MK
245Before glibc 2.17,
246.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6808
247did not set
248.I errno
249for "range error: result underflow".
250.PP
b324e17d 251In 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
254these functions do not raise an invalid floating-point exception
255.RB ( FE_INVALID )