1 subroutine qelg(n,epstab,result,abserr,res3la,nres)
51 real abserr,delta1,delta2,delta3,r1mach,
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
55 dimension epstab(52),res3la(3)
89 epstab(n+2) = epstab(n)
104 tol2 = amax1(abs(e2),e1abs)*epmach
107 tol3 = amax1(e1abs,abs(e0))*epmach
108 if(err2.gt.tol2.or.err3.gt.tol3)
go to 10
123 tol1 = amax1(e1abs,abs(e3))*epmach
128 if(err1.le.tol1.or.err2.le.tol2.or.err3.le.tol3)
go to 20
129 ss = 0.1e+01/delta1+0.1e+01/delta2-0.1e+01/delta3
136 if(epsinf.gt.0.1e-03)
go to 30
144 30 res = e1+0.1e+01/ss
147 error = err2+abs(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
171 res3la(nres) = result
177 90 abserr = abs(result-res3la(3))+abs(result-res3la(2))
178 * +abs(result-res3la(1))
179 res3la(1) = res3la(2)
180 res3la(2) = res3la(3)
182 100 abserr = amax1(abserr,0.5e+01*epmach*abs(result))
subroutine qelg(n, epstab, result, abserr, res3la, nres)