]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/j0.3
b92425025a6c2b92727d2fbc2ad919ae9b03d1e7
[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 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .\" References consulted:
8 .\" Linux libc source code
9 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
10 .\" 386BSD man pages
11 .\" Modified Sat Jul 24 19:08:17 1993 by Rik Faith (faith@cs.unc.edu)
12 .\" Modified 2002-08-25, aeb
13 .\" Modified 2004-11-12 as per suggestion by Fabian Kreutz/AEB
14 .\" 2008-07-24, mtk, moved yxx() material into separate y0.3 page
15 .\"
16 .TH J0 3 2021-03-22 "" "Linux Programmer's Manual"
17 .SH NAME
18 j0, j0f, j0l, j1, j1f, j1l, jn, jnf, jnl \-
19 Bessel functions of the first kind
20 .SH LIBRARY
21 Math library
22 .RI ( libm ", " \-lm )
23 .SH SYNOPSIS
24 .nf
25 .B #include <math.h>
26 .PP
27 .BI "double j0(double " x );
28 .BI "double j1(double " x );
29 .BI "double jn(int " n ", double " x );
30 .PP
31 .BI "float j0f(float " x );
32 .BI "float j1f(float " x );
33 .BI "float jnf(int " n ", float " x );
34 .PP
35 .BI "long double j0l(long double " x );
36 .BI "long double j1l(long double " x );
37 .BI "long double jnl(int " n ", long double " x );
38 .fi
39 .PP
40 .RS -4
41 Feature Test Macro Requirements for glibc (see
42 .BR feature_test_macros (7)):
43 .RE
44 .PP
45 .BR j0 (),
46 .BR j1 (),
47 .BR jn ():
48 .nf
49 _XOPEN_SOURCE
50 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
51 || /* Glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
52 .fi
53 .PP
54 .BR j0f (),
55 .BR j0l (),
56 .BR j1f (),
57 .BR j1l (),
58 .BR jnf (),
59 .BR jnl ():
60 .nf
61 _XOPEN_SOURCE >= 600
62 || (_ISOC99_SOURCE && _XOPEN_SOURCE)
63 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
64 || /* Glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
65 .fi
66 .SH DESCRIPTION
67 The
68 .BR j0 ()
69 and
70 .BR j1 ()
71 functions return Bessel functions of
72 .I x
73 of the first kind of orders 0 and 1, respectively.
74 The
75 .BR jn ()
76 function
77 returns the Bessel function of
78 .I x
79 of the first kind of order
80 .IR n .
81 .PP
82 The
83 .BR j0f (),
84 .BR j1f (),
85 and
86 .BR jnf (),
87 functions are versions that take and return
88 .I float
89 values.
90 The
91 .BR j0l (),
92 .BR j1l (),
93 and
94 .BR jnl ()
95 functions are versions that take and return
96 .I "long double"
97 values.
98 .SH RETURN VALUE
99 On success, these functions return the appropriate
100 Bessel value of the first kind for
101 .IR x .
102 .PP
103 If
104 .I x
105 is a NaN, a NaN is returned.
106 .PP
107 If
108 .I x
109 is too large in magnitude,
110 or the result underflows,
111 a range error occurs,
112 and the return value is 0.
113 .SH ERRORS
114 See
115 .BR math_error (7)
116 for information on how to determine whether an error has occurred
117 when calling these functions.
118 .PP
119 The following errors can occur:
120 .TP
121 Range error: result underflow, or \fIx\fP is too large in magnitude
122 .I errno
123 is set to
124 .BR ERANGE .
125 .PP
126 These functions do not raise exceptions for
127 .BR fetestexcept (3).
128 .\" e.g., j0(1.5e16)
129 .\" This is intentional.
130 .\" See http://sources.redhat.com/bugzilla/show_bug.cgi?id=6805
131 .SH ATTRIBUTES
132 For an explanation of the terms used in this section, see
133 .BR attributes (7).
134 .ad l
135 .nh
136 .TS
137 allbox;
138 lbx lb lb
139 l l l.
140 Interface Attribute Value
141 T{
142 .BR j0 (),
143 .BR j0f (),
144 .BR j0l ()
145 T} Thread safety MT-Safe
146 T{
147 .BR j1 (),
148 .BR j1f (),
149 .BR j1l ()
150 T} Thread safety MT-Safe
151 T{
152 .BR jn (),
153 .BR jnf (),
154 .BR jnl ()
155 T} Thread safety MT-Safe
156 .TE
157 .hy
158 .ad
159 .sp 1
160 .SH CONFORMING TO
161 The functions returning
162 .I double
163 conform to SVr4, 4.3BSD,
164 POSIX.1-2001, and POSIX.1-2008.
165 The others are nonstandard functions that also exist on the BSDs.
166 .SH BUGS
167 There are errors of up to 2e\-16 in the values returned by
168 .BR j0 (),
169 .BR j1 (),
170 and
171 .BR jn ()
172 for values of
173 .I x
174 between \-8 and 8.
175 .SH SEE ALSO
176 .BR y0 (3)