资 源 简 介
用于计算不同阶数的第一类贝塞尔函数Fortran代码!第一类n阶BESSEL函数bessjfunction bessj(n,x)integer n,IACCreal(8) bessj,x,BIGNO,BIGNIPARAMETER (IACC=40,BIGNO=1.e10,BIGNI=1.e-10)INTEGER j,jsum,mreal(8) ax,bj,bjm,bjp,sum,tox,bessj0,bessj1if(n<2)pause"bad argument n in bessj"ax=abs(x)if(ax==0.)then bessj=0.else if (ax>float(n))then tox=2./ax bjm=bessj0(ax) bj=bessj1(ax) do j=1,n-1 bjp=j*tox*bj-bjmbjm=bjbj=bjp end do bessj=bjelse tox=2./ax m=2*((n+int(sqrt(float(IACC*n))))/2) bessj=0. jsum=0 sum=0. bjp=0. bj=1. do j=m,1,-1 bjm=j*tox*bj-bjpbjp=bjbj=bjmif(abs(bj)>BIGNO)then bj=bj*BIGNI bjp=bjp*BIGNI bessj=bessj*BIGNI sum=sum*BIGNIendifif(jsum/=0) s