real(4) function bess4(m)
integer numar_termeni(0:10) 
common numar_termeni, iprint

b =0.0
do k =0,100
!t=1d0/fact(k)/fact(k+m)/((-4d0)**k)
t=(-.25)**k/fact4(k)/fact4(k+m)

 if(abs(t) <= 1E-15) then
    if(iprint /=0) write(*, '(I2, t4, I3, t17, 1pD18.9)') m, k, t
 numar_termeni(m) =k
 exit
 endif

b =b+t
enddo
bess4 = b/2.0**m
end
!----------------------------------

real(8) function bess8(m)
implicit real(8) (a-h,o-z)
integer numar_termeni(0:10)
common numar_termeni, iprint

b =0D0
do k =0,100
!t=1d0/fact(k)/fact(k+m)/((-4d0)**k)
t=(-.25D0)**k/fact8(k)/fact8(k+m)

 if(dabs(t) <= 1D-15) then
    if(iprint /=0) write(*, '(I2, t4, I3, t17, 1pD18.9)') m, k, t
 numar_termeni(m) =k
 exit
 endif

b =b+t
enddo
bess8 = b/2D0**m
end
!----------------------------------

real(16) function bess16(m)
implicit real(16) (a-h,o-z)
integer numar_termeni(0:10) 
common numar_termeni, iprint

b =0Q0
do k =0,100
!t=1d0/fact(k)/fact(k+m)/((-4d0)**k)
t=(-.25q0)**k/fact16(k)/fact16(k+m)

 if(qabs(t) <= 1D-15) then
    if(iprint /=0) write(*, '(I2, t4, I3, t17, 1pD18.9)') m, k, t
 numar_termeni(m) =k
 exit
 endif

b=b+t
enddo
bess16 = b/2D0**m
end