]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/y0.3
y0.3: srcfix: remove an ancient FIXME that no longer matters much
[thirdparty/man-pages.git] / man3 / y0.3
CommitLineData
17d2ffdf
MK
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.\"
93015253 5.\" %%%LICENSE_START(VERBATIM)
17d2ffdf
MK
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.
4b72fb64 25.\" %%%LICENSE_END
17d2ffdf
MK
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.\"
4b8c67d9 36.TH Y0 3 2017-09-15 "" "Linux Programmer's Manual"
17d2ffdf
MK
37.SH NAME
38y0, y0f, y0l, y1, y1f, y1l, yn, ynf, ynl \-
39Bessel functions of the second kind
40.SH SYNOPSIS
41.nf
42.B #include <math.h>
68e4db0a 43.PP
17d2ffdf 44.BI "double y0(double " x );
17d2ffdf 45.BI "double y1(double " x );
17d2ffdf 46.BI "double yn(int " n ", double " x );
68e4db0a 47.PP
17d2ffdf 48.BI "float y0f(float " x );
17d2ffdf 49.BI "float y1f(float " x );
17d2ffdf 50.BI "float ynf(int " n ", float " x );
68e4db0a 51.PP
17d2ffdf 52.BI "long double y0l(long double " x );
17d2ffdf 53.BI "long double y1l(long double " x );
17d2ffdf
MK
54.BI "long double ynl(int " n ", long double " x );
55.fi
68e4db0a 56.PP
17d2ffdf 57Link with \fI\-lm\fP.
68e4db0a 58.PP
17d2ffdf
MK
59.in -4n
60Feature Test Macro Requirements for glibc (see
61.BR feature_test_macros (7)):
62.in
68e4db0a 63.PP
17d2ffdf
MK
64.ad l
65.BR y0 (),
66.BR y1 (),
67.BR yn ():
d0f830af 68.RS 4
636ed4d5
MK
69_XOPEN_SOURCE
70 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
71 || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
d0f830af 72.RE
17d2ffdf
MK
73.br
74.BR y0f (),
75.BR y0l (),
76.BR y1f (),
77.BR y1l (),
78.BR ynf (),
79.BR ynl ():
d0f830af 80.RS 4
636ed4d5
MK
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
d0f830af 85.RE
17d2ffdf
MK
86.ad b
87.SH DESCRIPTION
88.PP
89The
90.BR y0 ()
91and
92.BR y1 ()
c6fa0841
MK
93functions return Bessel functions of
94.I x
17d2ffdf
MK
95of the second kind of orders 0 and 1, respectively.
96The
97.BR yn ()
98function
c6fa0841
MK
99returns the Bessel function of
100.I x
101of the second kind of order
102.IR n .
17d2ffdf 103.PP
c6fa0841
MK
104The value of
105.I x
106must be positive.
17d2ffdf
MK
107.PP
108The
80017421
MK
109.BR y0f (),
110.BR y1f (),
111and
112.BR ynf ()
113functions are versions that take and return
17d2ffdf 114.I float
80017421
MK
115values.
116The
117.BR y0l (),
118.BR y1l (),
17d2ffdf 119and
80017421
MK
120.BR ynl ()
121functions are versions that take and return
17d2ffdf 122.I "long double"
80017421 123values.
17d2ffdf
MK
124.SH RETURN VALUE
125On success, these functions return the appropriate
126Bessel value of the second kind for
127.IR x .
847e0d88 128.PP
17d2ffdf
MK
129If
130.I x
131is a NaN, a NaN is returned.
847e0d88 132.PP
17d2ffdf
MK
133If
134.I x
135is negative,
efe294cb 136a domain error occurs,
17d2ffdf
MK
137and the functions return
138.RB - HUGE_VAL ,
139.RB - HUGE_VALF ,
140or
141.RB - HUGE_VALL ,
142respectively.
143(POSIX.1-2001 also allows a NaN return for this case.)
847e0d88 144.PP
17d2ffdf
MK
145If
146.I x
147is 0.0,
efe294cb 148a pole error occurs,
17d2ffdf
MK
149and the functions return
150.RB - HUGE_VAL ,
151.RB - HUGE_VALF ,
152or
153.RB - HUGE_VALL ,
154respectively.
847e0d88 155.PP
17d2ffdf 156If the result underflows,
efe294cb 157a range error occurs,
17d2ffdf 158and the functions return 0.0
847e0d88 159.PP
17d2ffdf 160If the result overflows,
efe294cb 161a range error occurs,
17d2ffdf
MK
162and the functions return
163.RB - HUGE_VAL ,
164.RB - HUGE_VALF ,
165or
166.RB - HUGE_VALL ,
167respectively.
168(POSIX.1-2001 also allows a 0.0 return for this case.)
169.SH ERRORS
170See
171.BR math_error (7)
172for information on how to determine whether an error has occurred
173when calling these functions.
174.PP
175The following errors can occur:
176.TP
177Domain error: \fIx\fP is negative
178.I errno
179is set to
180.BR EDOM .
181An invalid floating-point exception
182.RB ( FE_INVALID )
183is raised.
184.TP
185Pole error: \fIx\fP is 0.0
186.\" Before POSIX.1-2001 TC2, this was (inconsistently) specified
187.\" as a range error.
188.I errno
189is set to
385cf745 190.BR ERANGE
696b65a5 191and an
17d2ffdf 192.B FE_DIVBYZERO
696b65a5
MK
193exception is raised
194(but see BUGS).
17d2ffdf
MK
195.TP
196Range error: result underflow
197.\" e.g., y0(1e33) on glibc 2.8/x86-32
198.I errno
199is set to
200.BR ERANGE .
17d2ffdf
MK
201No
202.B FE_UNDERFLOW
203exception is returned by
c2e0ff42
MK
204.\" This is intended behavior
205.\" See http://sources.redhat.com/bugzilla/show_bug.cgi?id=6806
17d2ffdf
MK
206.BR fetestexcept (3)
207for this case.
208.TP
209Range error: result overflow
210.\" e.g., yn(10, 1e-40) on glibc 2.8/x86-32
211.\" .I errno
212.\" is set to
213.\" .BR ERANGE .
214.I errno
215is not set for this case.
216.\" FIXME . Is it intentional that errno is not set?
217.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6808
218An overflow floating-point exception
219.RB ( FE_OVERFLOW )
220is raised.
2d3e3a67
MS
221.SH ATTRIBUTES
222For an explanation of the terms used in this section, see
223.BR attributes (7).
224.TS
225allbox;
226lb lb lb
227l l l.
228Interface Attribute Value
229T{
230.BR y0 (),
231.BR y0f (),
232.BR y0l ()
233T} Thread safety MT-Safe
234T{
235.BR y1 (),
236.BR y1f (),
237.BR y1l ()
238T} Thread safety MT-Safe
239T{
240.BR yn (),
241.BR ynf (),
242.BR ynl ()
243T} Thread safety MT-Safe
244.TE
47297adb 245.SH CONFORMING TO
17d2ffdf
MK
246The functions returning
247.I double
248conform to SVr4, 4.3BSD,
9a0216ac 249POSIX.1-2001, POSIX.1-2008.
c8f2dd47 250The others are nonstandard functions that also exist on the BSDs.
17d2ffdf 251.SH BUGS
696b65a5
MK
252Before glibc 2.19,
253.\" http://sourceware.org/bugzilla/show_bug.cgi?id=6807
254these functions misdiagnosed pole errors:
17d2ffdf 255.I errno
696b65a5 256was set to
17d2ffdf
MK
257.BR EDOM ,
258instead of
259.BR ERANGE
696b65a5
MK
260and no
261.B FE_DIVBYZERO
262exception was raised.
847e0d88 263.PP
b71168c2 264In glibc version 2.3.2 and earlier,
14b81bcf 265.\" Actually, 2.3.2 is the earliest test result I have; so yet
b71168c2
MK
266.\" to confirm if this error occurs only in 2.3.2.
267these functions do not raise an invalid floating-point exception
268.RB ( FE_INVALID )