9 besselj(x,n) = (2/x) (n-1) besselj(x,n-1) - besselj(x,n-2)
11 besselj(x,1/2) = sqrt(2/pi/x) sin(x)
13 besselj(x,-1/2) = sqrt(2/pi/x) cos(x)
15 For negative n, reorder the recurrence relation as
17 besselj(x,n-2) = (2/x) (n-1) besselj(x,n-1) - besselj(x,n)
19 Substitute n+2 for n to obtain
21 besselj(x,n) = (2/x) (n+1) besselj(x,n+1) - besselj(x,n+2)
25 besselj(x,3/2) = (1/x) besselj(x,1/2) - besselj(x,-1/2)
27 besselj(x,-3/2) = -(1/x) besselj(x,-1/2) - besselj(x,1/2)
69 if (isdouble(X
) && n
!= (int) 0x80000000) {
77 if (iszero(X
) && iszero(N
)) {
84 if (iszero(X
) && n
!= (int) 0x80000000) {
91 if (N
->k
== NUM
&& MEQUAL(N
->u
.q
.b
, 2)) {
95 if (MEQUAL(N
->u
.q
.a
, 1)) {
111 if (MEQUAL(N
->u
.q
.a
, -1)) {
125 // besselj(x,n) = (2/x) (n-sgn(n)) besselj(x,n-sgn(n)) - besselj(x,n-2*sgn(n))
127 push_integer(MSIGN(N
->u
.q
.a
));
155 #if 0 // test cases needed
156 if (isnegativeterm(X
)) {
166 push_symbol(BESSELJ
);
175 if (isnegativeterm(N
)) {
179 push_symbol(BESSELJ
);
189 push(symbol(BESSELJ
));