3
* Bessel function of second kind of integer order
18
* Returns Bessel function of order n, where n is a
19
* (possibly negative) integer.
21
* The function is evaluated by forward recurrence on
22
* n, starting with values computed by the routines
25
* If n = 0 or 1 the routine for y0 or y1 is called
33
* Absolute error, except relative
35
* arithmetic domain # trials peak rms
36
* DEC 0, 30 2200 2.9e-16 5.3e-17
37
* IEEE 0, 30 30000 3.4e-15 4.3e-16
42
* message condition value returned
43
* yn singularity x = 0 MAXNUM
46
* Spot checked against tables for x, n between 0 and 100.
51
Cephes Math Library Release 2.1: December, 1988
52
Copyright 1984, 1987 by Stephen L. Moshier
53
Direct inquiries to 30 Frost Street, Cambridge, MA 02140
61
extern double MAXNUM, MAXLOG;
67
double an, anm1, anm2, r;
73
if( (n & 1) == 0 ) /* -1**n */
83
return( sign * y0(x) );
85
return( sign * y1(x) );
87
/* test for overflow */
94
/* forward recurrence on n */
102
an = r * anm1 / x - anm2;