]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/j0.3
j0.3: srcfix: add notes that failing to raise FE_UNDERFLOW is intended behavior
[thirdparty/man-pages.git] / man3 / j0.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, moved yxx() material into separate y0.3 page
35 .\"
36 .TH J0 3 2017-09-15 "" "Linux Programmer's Manual"
37 .SH NAME
38 j0, j0f, j0l, j1, j1f, j1l, jn, jnf, jnl \-
39 Bessel functions of the first kind
40 .SH SYNOPSIS
41 .nf
42 .B #include <math.h>
43 .PP
44 .BI "double j0(double " x );
45 .BI "double j1(double " x );
46 .BI "double jn(int " n ", double " x );
47 .PP
48 .BI "float j0f(float " x );
49 .BI "float j1f(float " x );
50 .BI "float jnf(int " n ", float " x );
51 .PP
52 .BI "long double j0l(long double " x );
53 .BI "long double j1l(long double " x );
54 .BI "long double jnl(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 j0 (),
66 .BR j1 (),
67 .BR jn ():
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 j0f (),
75 .BR j0l (),
76 .BR j1f (),
77 .BR j1l (),
78 .BR jnf (),
79 .BR jnl ():
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 The
89 .BR j0 ()
90 and
91 .BR j1 ()
92 functions return Bessel functions of
93 .I x
94 of the first kind of orders 0 and 1, respectively.
95 The
96 .BR jn ()
97 function
98 returns the Bessel function of
99 .I x
100 of the first kind of order
101 .IR n .
102 .PP
103 The
104 .BR j0f (),
105 .BR j1f (),
106 and
107 .BR jnf (),
108 functions are versions that take and return
109 .I float
110 values.
111 The
112 .BR j0l (),
113 .BR j1l (),
114 and
115 .BR jnl ()
116 functions are versions that take and return
117 .I "long double"
118 values.
119 .SH RETURN VALUE
120 On success, these functions return the appropriate
121 Bessel value of the first kind for
122 .IR x .
123 .PP
124 If
125 .I x
126 is a NaN, a NaN is returned.
127 .PP
128 If
129 .I x
130 is too large in magnitude,
131 or the result underflows,
132 a range error occurs,
133 and the return value is 0.
134 .SH ERRORS
135 See
136 .BR math_error (7)
137 for information on how to determine whether an error has occurred
138 when calling these functions.
139 .PP
140 The following errors can occur:
141 .TP
142 Range error: result underflow, or \fIx\fP is too large in magnitude
143 .I errno
144 is set to
145 .BR ERANGE .
146 .PP
147 These functions do not raise exceptions for
148 .BR fetestexcept (3).
149 .\" e.g., j0(1.5e16)
150 .\" This is intentional.
151 .\" See http://sources.redhat.com/bugzilla/show_bug.cgi?id=6805
152 .SH ATTRIBUTES
153 For an explanation of the terms used in this section, see
154 .BR attributes (7).
155 .TS
156 allbox;
157 lb lb lb
158 l l l.
159 Interface Attribute Value
160 T{
161 .BR j0 (),
162 .BR j0f (),
163 .BR j0l ()
164 T} Thread safety MT-Safe
165 T{
166 .BR j1 (),
167 .BR j1f (),
168 .BR j1l ()
169 T} Thread safety MT-Safe
170 T{
171 .BR jn (),
172 .BR jnf (),
173 .BR jnl ()
174 T} Thread safety MT-Safe
175 .TE
176 .SH CONFORMING TO
177 The functions returning
178 .I double
179 conform to SVr4, 4.3BSD,
180 POSIX.1-2001, and POSIX.1-2008.
181 The others are nonstandard functions that also exist on the BSDs.
182 .SH BUGS
183 There are errors of up to 2e\-16 in the values returned by
184 .BR j0 (),
185 .BR j1 ()
186 and
187 .BR jn ()
188 for values of
189 .I x
190 between \-8 and 8.
191 .SH SEE ALSO
192 .BR y0 (3)