OSDN Git Service

4ecd029a1f4c085c469d1aa26ccaf7165d8a13fb
[linuxjm/LDP_man-pages.git] / original / 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  2014-01-18 "" "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 .sp
44 .fi
45 .BI "double j0(double " x );
46 .br
47 .BI "double j1(double " x );
48 .br
49 .BI "double jn(int " n ", double " x );
50 .sp
51 .BI "float j0f(float " x );
52 .br
53 .BI "float j1f(float " x );
54 .br
55 .BI "float jnf(int " n ", float " x );
56 .sp
57 .BI "long double j0l(long double " x );
58 .br
59 .BI "long double j1l(long double " x );
60 .br
61 .BI "long double jnl(int " n ", long double " x );
62 .sp
63 Link with \fI\-lm\fP.
64 .sp
65 .in -4n
66 Feature Test Macro Requirements for glibc (see
67 .BR feature_test_macros (7)):
68 .in
69 .sp
70 .ad l
71 .BR j0 (),
72 .BR j1 (),
73 .BR jn ():
74 .RS 4
75 _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE
76 .RE
77 .br
78 .BR j0f (),
79 .BR j0l (),
80 .BR j1f (),
81 .BR j1l (),
82 .BR jnf (),
83 .BR jnl ():
84 .RS 4
85 _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 600
86 .\" Also seems to work: -std=c99 -D_XOPEN_SOURCE
87 .RE
88 .ad b
89 .SH DESCRIPTION
90 The
91 .BR j0 ()
92 and
93 .BR j1 ()
94 functions return Bessel functions of
95 .I x
96 of the first kind of orders 0 and 1, respectively.
97 The
98 .BR jn ()
99 function
100 returns the Bessel function of
101 .I x
102 of the first kind of order
103 .IR n .
104 .PP
105 The
106 .BR j0f (),
107 .BR j1f (),
108 and
109 .BR jnf (),
110 functions are versions that take and return
111 .I float
112 values.
113 The
114 .BR j0l (),
115 .BR j1l (),
116 and
117 .BR jnl ()
118 functions are versions that take and return
119 .I "long double"
120 values.
121 .SH RETURN VALUE
122 On success, these functions return the appropriate
123 Bessel value of the first kind for
124 .IR x .
125
126 If
127 .I x
128 is a NaN, a NaN is returned.
129
130 If
131 .I x
132 is too large in magnitude,
133 or the result underflows,
134 a range error occurs,
135 and the return value is 0.
136 .SH ERRORS
137 See
138 .BR math_error (7)
139 for information on how to determine whether an error has occurred
140 when calling these functions.
141 .PP
142 The following errors can occur:
143 .TP
144 Range error: result underflow, or \fIx\fP is too large in magnitude
145 .I errno
146 is set to
147 .BR ERANGE .
148 .\" An underflow floating-point exception
149 .\" .RB ( FE_UNDERFLOW )
150 .\" is raised.
151 .PP
152 These functions do not raise exceptions for
153 .BR fetestexcept (3).
154 .\" FIXME . Is it intentional that these functions do not raise exceptions?
155 .\" e.g., j0(1.5e16)
156 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6805
157 .SH CONFORMING TO
158 The functions returning
159 .I double
160 conform to SVr4, 4.3BSD,
161 POSIX.1-2001.
162 The others are nonstandard functions that also exist on the BSDs.
163 .SH BUGS
164 There are errors of up to 2e\-16 in the values returned by
165 .BR j0 (),
166 .BR j1 ()
167 and
168 .BR jn ()
169 for values of
170 .I x
171 between \-8 and 8.
172 .SH SEE ALSO
173 .BR y0 (3)
174 .SH COLOPHON
175 This page is part of release 3.67 of the Linux
176 .I man-pages
177 project.
178 A description of the project,
179 information about reporting bugs,
180 and the latest version of this page,
181 can be found at
182 \%http://www.kernel.org/doc/man\-pages/.