]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) |
8f6f581d MK |
2 | .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk |
3 | .\" <mtk.manpages@gmail.com> | |
fea681da | 4 | .\" |
93015253 | 5 | .\" %%%LICENSE_START(VERBATIM) |
fea681da 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. | |
c13182ef | 14 | .\" |
fea681da MK |
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. | |
c13182ef | 22 | .\" |
fea681da MK |
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 |
fea681da 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 | |
b4528020 | 33 | .\" Modified 2004-11-12 as per suggestion by Fabian Kreutz/AEB |
8f6f581d | 34 | .\" 2008-07-24, mtk, moved yxx() material into separate y0.3 page |
fea681da | 35 | .\" |
4b8c67d9 | 36 | .TH J0 3 2017-09-15 "" "Linux Programmer's Manual" |
fea681da | 37 | .SH NAME |
8f6f581d MK |
38 | j0, j0f, j0l, j1, j1f, j1l, jn, jnf, jnl \- |
39 | Bessel functions of the first kind | |
fea681da MK |
40 | .SH SYNOPSIS |
41 | .nf | |
42 | .B #include <math.h> | |
68e4db0a | 43 | .PP |
fea681da | 44 | .BI "double j0(double " x ); |
fea681da | 45 | .BI "double j1(double " x ); |
fea681da | 46 | .BI "double jn(int " n ", double " x ); |
68e4db0a | 47 | .PP |
fea681da | 48 | .BI "float j0f(float " x ); |
fea681da | 49 | .BI "float j1f(float " x ); |
fea681da | 50 | .BI "float jnf(int " n ", float " x ); |
68e4db0a | 51 | .PP |
fea681da | 52 | .BI "long double j0l(long double " x ); |
fea681da | 53 | .BI "long double j1l(long double " x ); |
fea681da | 54 | .BI "long double jnl(int " n ", long double " x ); |
a1048f8e | 55 | .fi |
68e4db0a | 56 | .PP |
20c58d70 | 57 | Link with \fI\-lm\fP. |
68e4db0a | 58 | .PP |
cc4615cc MK |
59 | .in -4n |
60 | Feature Test Macro Requirements for glibc (see | |
61 | .BR feature_test_macros (7)): | |
62 | .in | |
68e4db0a | 63 | .PP |
cc4615cc | 64 | .ad l |
8f6f581d MK |
65 | .BR j0 (), |
66 | .BR j1 (), | |
64425118 | 67 | .BR jn (): |
81cae95b | 68 | .RS 4 |
636ed4d5 MK |
69 | _XOPEN_SOURCE |
70 | || /* Since glibc 2.19: */ _DEFAULT_SOURCE | |
71 | || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE | |
81cae95b | 72 | .RE |
8f6f581d MK |
73 | .br |
74 | .BR j0f (), | |
75 | .BR j0l (), | |
76 | .BR j1f (), | |
77 | .BR j1l (), | |
78 | .BR jnf (), | |
64425118 | 79 | .BR jnl (): |
81cae95b | 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 | |
81cae95b | 85 | .RE |
cc4615cc | 86 | .ad b |
fea681da | 87 | .SH DESCRIPTION |
60a90ecd MK |
88 | The |
89 | .BR j0 () | |
90 | and | |
91 | .BR j1 () | |
022671eb MK |
92 | functions return Bessel functions of |
93 | .I x | |
c13182ef | 94 | of the first kind of orders 0 and 1, respectively. |
60a90ecd MK |
95 | The |
96 | .BR jn () | |
97 | function | |
022671eb MK |
98 | returns the Bessel function of |
99 | .I x | |
100 | of the first kind of order | |
101 | .IR n . | |
fea681da | 102 | .PP |
60a90ecd | 103 | The |
4e0344e4 MK |
104 | .BR j0f (), |
105 | .BR j1f (), | |
106 | and | |
107 | .BR jnf (), | |
108 | functions are versions that take and return | |
c13182ef | 109 | .I float |
4e0344e4 MK |
110 | values. |
111 | The | |
112 | .BR j0l (), | |
113 | .BR j1l (), | |
c13182ef | 114 | and |
4e0344e4 MK |
115 | .BR jnl () |
116 | functions are versions that take and return | |
68e1685c | 117 | .I "long double" |
4e0344e4 | 118 | values. |
8f6f581d MK |
119 | .SH RETURN VALUE |
120 | On success, these functions return the appropriate | |
121 | Bessel value of the first kind for | |
122 | .IR x . | |
847e0d88 | 123 | .PP |
8f6f581d MK |
124 | If |
125 | .I x | |
126 | is a NaN, a NaN is returned. | |
847e0d88 | 127 | .PP |
8f6f581d MK |
128 | If |
129 | .I x | |
130 | is too large in magnitude, | |
131 | or the result underflows, | |
efe294cb | 132 | a range error occurs, |
8f6f581d MK |
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 | .\" An underflow floating-point exception | |
147 | .\" .RB ( FE_UNDERFLOW ) | |
148 | .\" is raised. | |
149 | .PP | |
150 | These functions do not raise exceptions for | |
151 | .BR fetestexcept (3). | |
152 | .\" FIXME . Is it intentional that these functions do not raise exceptions? | |
153 | .\" e.g., j0(1.5e16) | |
154 | .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6805 | |
97944d60 MS |
155 | .SH ATTRIBUTES |
156 | For an explanation of the terms used in this section, see | |
157 | .BR attributes (7). | |
158 | .TS | |
159 | allbox; | |
160 | lb lb lb | |
161 | l l l. | |
162 | Interface Attribute Value | |
163 | T{ | |
164 | .BR j0 (), | |
165 | .BR j0f (), | |
166 | .BR j0l () | |
167 | T} Thread safety MT-Safe | |
168 | T{ | |
169 | .BR j1 (), | |
170 | .BR j1f (), | |
171 | .BR j1l () | |
172 | T} Thread safety MT-Safe | |
173 | T{ | |
174 | .BR jn (), | |
175 | .BR jnf (), | |
176 | .BR jnl () | |
177 | T} Thread safety MT-Safe | |
178 | .TE | |
47297adb | 179 | .SH CONFORMING TO |
c13182ef MK |
180 | The functions returning |
181 | .I double | |
68e1685c | 182 | conform to SVr4, 4.3BSD, |
9a0216ac | 183 | POSIX.1-2001, and POSIX.1-2008. |
c8f2dd47 | 184 | The others are nonstandard functions that also exist on the BSDs. |
fea681da | 185 | .SH BUGS |
60a90ecd MK |
186 | There are errors of up to 2e\-16 in the values returned by |
187 | .BR j0 (), | |
188 | .BR j1 () | |
189 | and | |
190 | .BR jn () | |
022671eb MK |
191 | for values of |
192 | .I x | |
193 | between \-8 and 8. | |
8f6f581d MK |
194 | .SH SEE ALSO |
195 | .BR y0 (3) |