39 double precision fn(5),err
42 double precision cdx,ctmp,dxold,eps,yy,zz
44 double complex x,dx,x1,b,d,f,g,h,sq,gp,gm,g2,zero,xx,ww
49 parameter(czero=(0.,0.),tiny=1.e-15,maxit=100)
55 ctmp = ((fn(1)-fn(5))-8.0d0*(fn(2)-fn(4)))/12.0d0
56 a(1) = dcmplx(ctmp,0.0d0)
57 ctmp = ( -(fn(1)+fn(5))+16.0d0*(fn(2)+fn(4))-30.0d0*fn(3))/12.0d0
58 a(2) = dcmplx(ctmp,0.0d0)
59 ctmp =(-2.0d0*(fn(1)-fn(5))+6.0d0*(fn(2)-fn(4)))/12.0d0
60 a(3) = dcmplx(ctmp,0.0d0)
61 ctmp = ( 2.0*(fn(1)+fn(5))-8.0d0*(fn(2)+fn(4)))/12.0d0+fn(3)
62 a(4) = dcmplx(ctmp,0.0d0)
86 if(abs(b).le.tiny)
then
88 else if(abs(d).le.tiny.and.abs(f).le.tiny)
then
89 dx=cmplx(abs(b/a(m+1))**(1.d0/m),0.d0)
99 if(yy.lt.tiny.and.zz.lt.tiny)
then
101 else if (yy.ge.zz)
then
110 if(abs(gp).lt.abs(gm)) gp=gm
120 if(abs(dx).le.eps*abs(x))
then
125 print *,
'LGRINT: too many iterations'
126 print *,
'[execution paused, press enter to continue]'
double complex function lgrint(fn, err)