.\" Copyright (c) 1985 Regents of the University of California. .\" All rights reserved. The Berkeley software License Agreement .\" specifies the terms and conditions for redistribution. .\" .\" @(#)j0.3m 6.6 (Berkeley) 5/12/86 .\" .TH J0 3 "May 12, 1986" .UC 4 .SH NAME j0, j1, jn, y0, y1, yn \- bessel functions .SH SYNOPSIS .nf .ft B #include double j0(double \fIx\fP) double j1(double \fIx\fP) double jn(int \fIn\fP, double \fIx\fP) double y0(double \fIx\fP) double y1(double \fIx\fP) double yn(int \fIn\fP, double \fIx\fP) .ft R .fi .SH DESCRIPTION These functions calculate Bessel functions of the first and second kinds for real arguments and integer orders. .SH DIAGNOSTICS j0(NaN) = j1(NaN) = jn(n, NaN) = NaN. .br j0(0) = jn(0, 0) = 1. .br j1(0) = jn(n, 0) = 0 with n \(>= 1. .br j0(Inf) = j1(Inf) = jn(n, Inf) = 0. .PP y0(0) = y1(0) = yn(n, 0) = \-Inf with signal. .br y0(x) = y1(x) = yn(n, x) = NaN with signal if x < 0. .br y0(Inf) = y1(Inf) = yn(n, Inf) = 0. .SH NOTES About jn(n, x): .br For n=0, j0(x) is called, .br for n=1, j1(x) is called, .br for nx, a continued fraction approximation to j(n,x)/j(n-1,x) is evaluated and then backward recursion is used starting from a supposed value for j(n,x). The resulting value of j(0,x) is compared with the actual value to correct the supposed value of j(n,x). .PP yn(n,x) is similar in all respects, except that forward recursion is used for all values of n>1. .SH SEE ALSO .BR math (3).