1 SUBROUTINE dqelg(N,EPSTAB,RESULT,ABSERR,RES3LA,NRES)
51 DOUBLE PRECISION abserr,dabs,delta1,delta2,delta3,dmax1,
d1mach,
52 * epmach,epsinf,epstab,
error,err1,err2,err3,e0,e1,e1abs,e2,e3,
53 * oflow,res,
result,res3la,ss,tol1,tol2,tol3
54 INTEGER i,ib,ib2,ie,indx,k1,k2,k3,limexp,n,newelm,nres,num
89 epstab(n+2) = epstab(n)
104 tol2 = dmax1(dabs(e2),e1abs)*epmach
107 tol3 = dmax1(e1abs,dabs(e0))*epmach
108 IF(err2.GT.tol2.OR.err3.GT.tol3) go to 10
123 tol1 = dmax1(e1abs,dabs(e3))*epmach
128 IF(err1.LE.tol1.OR.err2.LE.tol2.OR.err3.LE.tol3) go to 20
129 ss = 0.1
d+01/delta1+0.1
d+01/delta2-0.1
d+01/delta3
136 IF(epsinf.GT.0.1
d-03) go to 30
144 30 res = e1+0.1
d+01/ss
147 error = err2+dabs(res-e2)+err3
148 IF(
error.GT.abserr) go to 40
155 50
IF(n.EQ.limexp) n = 2*(limexp/2)-1
157 IF((num/2)*2.EQ.num) ib = 2
161 epstab(ib) = epstab(ib2)
164 IF(num.EQ.n) go to 80
167 epstab(i)= epstab(indx)
170 80
IF(nres.GE.4) go to 90
177 90 abserr = dabs(
result-res3la(3))+dabs(
result-res3la(2))
179 res3la(1) = res3la(2)
180 res3la(2) = res3la(3)
182 100 abserr = dmax1(abserr,0.5
d+01*epmach*dabs(
result))