36 integer,
intent(in) :: m,lmax
37 real(8),
intent(in) :: x
38 real(8),
intent(out) :: djl(0:lmax)
40 integer,
parameter :: maxm=6,maxns=20
44 integer a(0:maxm+1),a1(0:maxm+1)
45 integer b(0:maxm+1),b1(0:maxm+1)
48 real(8),
external :: factn,factn2,factr
53 if ((m < 0).or.(m > maxm))
then 55 write(*,
'("Error(sbesseldm): m out of range : ",I8)') m
59 if ((lmax < 0).or.(lmax > 30))
then 61 write(*,
'("Error(sbesseldm): lmax out of range : ",I8)') lmax
65 if ((x < 0.d0).or.(x > 1.d5))
then 67 write(*,
'("Error(sbesseldm): x out of range : ",G18.10)') x
82 b1(j+1)=-a1(j)*(j+l+2)
92 sm=dble(a(0))*jl(l)+dble(a1(0))*jl(l+1)
95 sm=sm+(dble(a(i))*jl(l)+dble(a1(i))*jl(l+1))/t1
109 t1=factr(j+m,j)*t1/(factn(i0)*factn2(j+l+m+1)*dble((-2)**i0))
113 t1=-t1*dble((j-1)*j)*x2/dble((j-l)*(j-m-1)*(j-m)*(j+l+1))
114 if (abs(t1) < 1.d-40)
exit subroutine sbessel(lmax, x, jl)
subroutine sbesseldm(m, lmax, x, djl)