1 subroutine qagie(f,bound,inf,epsabs,epsrel,limit,result,abserr,
2 * neval,ier,alist,blist,rlist,elist,iord,last)
150 real abseps,abserr,alist,area,area1,area12,area2,a1,
151 *
a2,blist,boun,bound,b1,b2,correc,defabs,defab1,defab2,
152 * dres,
r1mach,elist,epmach,epsabs,epsrel,erlarg,erlast,
153 * errbnd,errmax,error1,error2,erro12,errsum,ertest,oflow,resabs,
155 integer id,ier,ierro,inf,iord,iroff1,iroff2,iroff3,jupbnd,k,ksgn,
156 * ktmin,last,
limit,maxerr,neval,nres,nrmax,numrl2
160 * res3la(3),rlist(
limit),rlist2(52)
233 if(epsabs.le.0.0e+00.and.epsrel.lt.amax1(0.5e+02*epmach,0.5e-14))
235 if(ier.eq.6) go to 999
247 if(inf.eq.2) boun = 0.0e+00
259 errbnd = amax1(epsabs,epsrel*dres)
260 if(abserr.le.1.0e+02*epmach*defabs.and.abserr.gt.
262 if(
limit.eq.1) ier = 1
263 if(ier.ne.0.or.(abserr.le.errbnd.and.abserr.ne.resabs).or.
264 * abserr.eq.0.0e+00) go to 130
288 if(dres.ge.(0.1e+01-0.5e+02*epmach)*defabs) ksgn = 1
299 b1 = 0.5e+00*(alist(maxerr)+blist(maxerr))
303 call
qk15i(
f,boun,inf,a1,b1,area1,error1,resabs,defab1,ier)
305 call
qk15i(
f,boun,inf,
a2,b2,area2,error2,resabs,defab2,ier)
312 erro12 = error1+error2
313 errsum = errsum+erro12-errmax
314 area = area+area12-rlist(maxerr)
315 if(defab1.eq.error1.or.defab2.eq.error2)go to 15
316 if(
abs(rlist(maxerr)-area12).gt.0.1e-04*
abs(area12)
317 * .or.erro12.lt.0.99e+00*errmax) go to 10
318 if(extrap) iroff2 = iroff2+1
319 if(.not.extrap) iroff1 = iroff1+1
320 10
if(last.gt.10.and.erro12.gt.errmax) iroff3 = iroff3+1
321 15 rlist(maxerr) = area1
323 errbnd = amax1(epsabs,epsrel*
abs(area))
328 if(iroff1+iroff2.ge.10.or.iroff3.ge.20) ier = 2
329 if(iroff2.ge.5) ierro = 3
334 if(last.eq.
limit) ier = 1
339 if(amax1(
abs(a1),
abs(b2)).le.(0.1e+01+0.1e+03*epmach)*
344 if(error2.gt.error1) go to 20
348 elist(maxerr) = error1
351 20 alist(maxerr) =
a2
354 rlist(maxerr) = area2
356 elist(maxerr) = error2
364 30 call
qpsrt(
limit,last,maxerr,errmax,elist,iord,nrmax)
365 if(errsum.le.errbnd) go to 115
366 if(ier.ne.0) go to 100
367 if(last.eq.2) go to 80
369 erlarg = erlarg-erlast
370 if(
abs(b1-a1).gt.small) erlarg = erlarg+erro12
376 if(
abs(blist(maxerr)-alist(maxerr)).gt.small) go to 90
379 40
if(ierro.eq.3.or.erlarg.le.ertest) go to 60
391 errmax = elist(maxerr)
392 if(
abs(blist(maxerr)-alist(maxerr)).gt.small) go to 90
399 rlist2(numrl2) = area
400 call
qelg(numrl2,rlist2,reseps,abseps,res3la,nres)
402 if(ktmin.gt.5.and.abserr.lt.0.1e-02*errsum) ier = 5
403 if(abseps.ge.abserr) go to 70
408 ertest = amax1(epsabs,epsrel*
abs(reseps))
409 if(abserr.le.ertest) go to 100
413 70
if(numrl2.eq.1) noext = .true.
414 if(ier.eq.5) go to 100
416 errmax = elist(maxerr)
419 small = small*0.5e+00
431 100
if(abserr.eq.oflow) go to 115
432 if((ier+ierro).eq.0) go to 110
433 if(ierro.eq.3) abserr = abserr+correc
435 if(
result.ne.0.0e+00.and.area.ne.0.0e+00)go to 105
436 if(abserr.gt.errsum)go to 115
437 if(area.eq.0.0e+00) go to 130
443 110
if(ksgn.eq.(-1).and.amax1(
abs(
result),
abs(area)).le.
444 * defabs*0.1e-01) go to 130
445 if(0.1e-01.gt.(
result/area).or.(
result/area).gt.0.1e+03.
446 *or.errsum.gt.
abs(area)) ier = 6
456 130 neval = 30*last-15
457 if(inf.eq.2) neval = 2*neval
458 if(ier.gt.2) ier=ier-1