不同阶数第一类贝塞尔函数Fortran代码
代码说明:
用于计算不同阶数的第一类贝塞尔函数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(nfloat(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
下载说明:请别用迅雷下载,失败请重下,重下不扣分!