217 pi = 3.14159265358979323846264338327950288419716939937510e+00_dp
221 subroutine qag ( f, a, b, epsabs, epsrel, key, result, abserr, neval, ier )
299 integer,
parameter :: limit = 500
303 real(dp) alist(limit)
305 real(dp) blist(limit)
306 real(dp) elist(limit)
309 real(dp),
external :: f
317 real(dp) rlist(limit)
319 call qage ( f, a, b, epsabs, epsrel, key, limit, result, abserr, neval, &
320 ier, alist, blist, rlist, elist, iord, last )
324 subroutine qage ( f, a, b, epsabs, epsrel, key, limit, result, abserr, neval, &
325 ier, alist, blist, rlist, elist, iord, last )
432 real(dp) alist(limit)
440 real(dp) blist(limit)
447 real(dp) elist(limit)
456 real(dp),
external :: f
470 real(dp) rlist(limit)
485 if ( epsabs < 0.0e+00 .and. epsrel < 0.0e+00 )
then 493 keyf = max( keyf, 1 )
494 keyf = min( keyf, 6 )
499 if ( keyf == 1 )
then 500 call qk15 ( f, a, b, result, abserr, defabs, resabs )
501 else if ( keyf == 2 )
then 502 call qk21 ( f, a, b, result, abserr, defabs, resabs )
503 else if ( keyf == 3 )
then 504 call qk31 ( f, a, b, result, abserr, defabs, resabs )
505 else if ( keyf == 4 )
then 506 call qk41 ( f, a, b, result, abserr, defabs, resabs )
507 else if ( keyf == 5 )
then 508 call qk51 ( f, a, b, result, abserr, defabs, resabs )
509 else if ( keyf == 6 )
then 510 call qk61 ( f, a, b, result, abserr, defabs, resabs )
520 errbnd = max( epsabs, epsrel * abs( result ) )
522 if ( abserr <= 5.0e+01 * epsilon( defabs ) * defabs .and. &
523 abserr > errbnd )
then 527 if ( limit == 1 )
then 532 ( abserr <= errbnd .and. abserr /= resabs ) .or. &
533 abserr == 0.0e+00 )
then 535 if ( keyf /= 1 )
then 536 neval = (10*keyf+1) * (2*neval+1)
538 neval = 30 * neval + 15
560 b1 = 0.5e+00 * ( alist(maxerr) + blist(maxerr) )
564 if ( keyf == 1 )
then 565 call qk15 ( f, a1, b1, area1, error1, resabs, defab1 )
566 else if ( keyf == 2 )
then 567 call qk21 ( f, a1, b1, area1, error1, resabs, defab1 )
568 else if ( keyf == 3 )
then 569 call qk31 ( f, a1, b1, area1, error1, resabs, defab1 )
570 else if ( keyf == 4 )
then 571 call qk41 ( f, a1, b1, area1, error1, resabs, defab1)
572 else if ( keyf == 5 )
then 573 call qk51 ( f, a1, b1, area1, error1, resabs, defab1 )
574 else if ( keyf == 6 )
then 575 call qk61 ( f, a1, b1, area1, error1, resabs, defab1 )
578 if ( keyf == 1 )
then 579 call qk15 ( f, a2, b2, area2, error2, resabs, defab2 )
580 else if ( keyf == 2 )
then 581 call qk21 ( f, a2, b2, area2, error2, resabs, defab2 )
582 else if ( keyf == 3 )
then 583 call qk31 ( f, a2, b2, area2, error2, resabs, defab2 )
584 else if ( keyf == 4 )
then 585 call qk41 ( f, a2, b2, area2, error2, resabs, defab2 )
586 else if ( keyf == 5 )
then 587 call qk51 ( f, a2, b2, area2, error2, resabs, defab2 )
588 else if ( keyf == 6 )
then 589 call qk61 ( f, a2, b2, area2, error2, resabs, defab2 )
596 area12 = area1 + area2
597 erro12 = error1 + error2
598 errsum = errsum + erro12 - errmax
599 area = area + area12 - rlist(maxerr)
601 if ( defab1 /= error1 .and. defab2 /= error2 )
then 603 if ( abs( rlist(maxerr) - area12 ) <= 1.0e-05 * abs( area12 ) &
604 .and. erro12 >= 9.9e-01 * errmax )
then 608 if ( last > 10 .and. erro12 > errmax )
then 614 rlist(maxerr) = area1
616 errbnd = max( epsabs, epsrel * abs( area ) )
620 if ( errsum > errbnd )
then 622 if ( iroff1 >= 6 .or. iroff2 >= 20 )
then 629 if ( last == limit )
then 636 if ( max( abs( a1 ), abs( b2 ) ) <= ( 1.0e+00 + c * 1.0e+03 * &
637 epsilon( a1 ) ) * ( abs( a2 ) + 1.0e+04 * tiny( a2 ) ) )
then 645 if ( error2 <= error1 )
then 649 elist(maxerr) = error1
655 rlist(maxerr) = area2
657 elist(maxerr) = error2
665 call qsort ( limit, last, maxerr, errmax, elist, iord, nrmax )
667 if ( ier /= 0 .or. errsum <= errbnd )
then 675 result = sum( rlist(1:last) )
679 if ( keyf /= 1 )
then 680 neval = ( 10 * keyf + 1 ) * ( 2 * neval + 1 )
682 neval = 30 * neval + 15
687 subroutine qagi ( f, bound, inf, epsabs, epsrel, result, abserr, neval, ier )
812 integer,
parameter :: limit = 500
816 real(dp) alist(limit)
823 real(dp) blist(limit)
833 real(dp) elist(limit)
846 real(dp),
external :: f
870 real(dp) rlist(limit)
887 if ( epsabs < 0.0e+00 .and. epsrel < 0.0e+00 )
then 905 call qk15i ( f, boun, inf, 0.0e+00_dp, 1.0e+00_dp, result, abserr, defabs, resabs )
914 errbnd = max( epsabs, epsrel * dres )
916 if ( abserr <= 100.0e+00 * epsilon( defabs ) * defabs .and. &
917 abserr > errbnd )
then 921 if ( limit == 1 )
then 925 if ( ier /= 0 .or. (abserr <= errbnd .and. abserr /= resabs ) .or. &
926 abserr == 0.0e+00 )
go to 130
935 abserr = huge( abserr )
947 if ( dres >= ( 1.0e+00 - 5.0e+01 * epsilon( defabs ) ) * defabs )
then 958 b1 = 5.0e-01 * ( alist(maxerr) + blist(maxerr) )
962 call qk15i ( f, boun, inf, a1, b1, area1, error1, resabs, defab1 )
963 call qk15i ( f, boun, inf, a2, b2, area2, error2, resabs, defab2 )
968 area12 = area1 + area2
969 erro12 = error1 + error2
970 errsum = errsum + erro12 - errmax
971 area = area + area12 - rlist(maxerr)
973 if ( defab1 /= error1 .and. defab2 /= error2 )
then 975 if ( abs( rlist(maxerr) - area12 ) <= 1.0e-05 * abs( area12 ) &
976 .and. erro12 >= 9.9e-01 * errmax )
then 982 if ( .not. extrap )
then 988 if ( last > 10 .and. erro12 > errmax )
then 994 rlist(maxerr) = area1
996 errbnd = max( epsabs, epsrel * abs( area ) )
1000 if ( iroff1 + iroff2 >= 10 .or. iroff3 >= 20 )
then 1004 if ( iroff2 >= 5 )
then 1010 if ( last == limit )
then 1017 if ( max( abs(a1), abs(b2) ) <= (1.0e+00 + 1.0e+03 * epsilon( a1 ) ) * &
1018 ( abs(a2) + 1.0e+03 * tiny( a2 ) ))
then 1024 if ( error2 <= error1 )
then 1028 elist(maxerr) = error1
1029 elist(last) = error2
1034 rlist(maxerr) = area2
1036 elist(maxerr) = error2
1037 elist(last) = error1
1044 call qsort ( limit, last, maxerr, errmax, elist, iord, nrmax )
1046 if ( errsum <= errbnd )
go to 115
1048 if ( ier /= 0 )
then 1052 if ( last == 2 )
then 1064 erlarg = erlarg-erlast
1066 if ( abs(b1-a1) > small )
then 1067 erlarg = erlarg+erro12
1073 if ( .not. extrap )
then 1075 if ( abs(blist(maxerr)-alist(maxerr)) > small )
then 1084 if ( ierro == 3 .or. erlarg <= ertest )
go to 60
1093 if ( last > (2+limit/2) )
then 1094 jupbnd = limit + 3 - last
1098 maxerr = iord(nrmax)
1099 errmax = elist(maxerr)
1100 if ( abs( blist(maxerr) - alist(maxerr) ) > small )
then 1111 rlist2(numrl2) = area
1112 call qextr ( numrl2, rlist2, reseps, abseps, res3la, nres )
1115 if ( ktmin > 5.and.abserr < 1.0e-03*errsum )
then 1119 if ( abseps < abserr )
then 1125 ertest = max( epsabs, epsrel*abs(reseps) )
1127 if ( abserr <= ertest )
then 1135 if ( numrl2 == 1 )
then 1139 if ( ier == 5 )
then 1144 errmax = elist(maxerr)
1147 small = small*5.0e-01
1156 if ( abserr == huge( abserr ) )
go to 115
1158 if ( (ier+ierro) == 0 )
go to 110
1160 if ( ierro == 3 )
then 1161 abserr = abserr+correc
1164 if ( ier == 0 )
then 1168 if ( result /= 0.0e+00 .and. area /= 0.0e+00)
go to 105
1169 if ( abserr > errsum)
go to 115
1170 if ( area == 0.0e+00)
go to 130
1175 if ( abserr / abs(result) > errsum / abs(area) )
go to 115
1181 if ( ksgn == (-1) .and. &
1182 max( abs(result), abs(area) ) <= defabs * 1.0e-02)
go to 130
1184 if ( 1.0e-02 > (result/area) .or. &
1185 (result/area) > 1.0e+02 .or. &
1186 errsum > abs(area))
then 1196 result = sum( rlist(1:last) )
1202 if ( inf == 2 )
then 1212 subroutine qagp ( f, a, b, npts2, points, epsabs, epsrel, result, abserr, &
1356 integer,
parameter :: limit = 500
1361 real(dp) alist(limit)
1369 real(dp) blist(limit)
1377 real(dp) elist(limit)
1390 real(dp),
external :: f
1410 integer level(limit)
1429 real(dp) rlist(limit)
1449 if ( npts2 < 2 )
then 1452 else if ( limit <= npts .or. (epsabs < 0.0e+00.and. &
1453 epsrel < 0.0e+00) )
then 1470 pts(i+1) = points(i)
1473 pts(npts+2) = max( a,b)
1477 if ( npts /= 0 )
then 1482 if ( pts(i) > pts(j) )
then 1483 call r_swap ( pts(i), pts(j) )
1488 if ( pts(1) /= min( a, b ) .or. pts(nint+1) /= max( a,b) )
then 1502 call qk21 ( f, a1, b1, area1, error1, defabs, resa )
1503 abserr = abserr+error1
1504 result = result+area1
1507 if ( error1 == resa .and. error1 /= 0.0e+00 )
then 1511 resabs = resabs + defabs
1525 if ( ndin(i) == 1 )
then 1528 errsum = errsum + elist(i)
1535 dres = abs( result )
1536 errbnd = max( epsabs, epsrel * dres )
1538 if ( abserr <= 1.0e+02 * epsilon( resabs ) * resabs .and. &
1539 abserr > errbnd )
then 1543 if ( nint /= 1 )
then 1552 if ( elist(ind1) <= elist(ind2) )
then 1558 if ( ind1 /= iord(i) )
then 1565 if ( limit < npts2 )
then 1571 if ( ier /= 0 .or. abserr <= errbnd )
then 1579 errmax = elist(maxerr)
1594 abserr = huge( abserr )
1596 if ( dres >= ( 1.0e+00 - 0.5e+00 * epsilon( resabs ) ) * resabs )
then 1602 do last = npts2, limit
1606 levcur = level(maxerr)+1
1608 b1 = 0.5e+00 * ( alist(maxerr) + blist(maxerr) )
1612 call qk21 ( f, a1, b1, area1, error1, resa, defab1 )
1613 call qk21 ( f, a2, b2, area2, error2, resa, defab2 )
1619 area12 = area1+area2
1620 erro12 = error1+error2
1621 errsum = errsum+erro12-errmax
1622 area = area+area12-rlist(maxerr)
1624 if ( defab1 /= error1 .and. defab2 /= error2 )
then 1626 if ( abs(rlist(maxerr)-area12) <= 1.0e-05*abs(area12) .and. &
1627 erro12 >= 9.9e-01*errmax )
then 1637 if ( last > 10 .and. erro12 > errmax )
then 1643 level(maxerr) = levcur
1644 level(last) = levcur
1645 rlist(maxerr) = area1
1647 errbnd = max( epsabs, epsrel * abs( area ) )
1651 if ( iroff1 + iroff2 >= 10 .or. iroff3 >= 20 )
then 1655 if ( iroff2 >= 5 )
then 1662 if ( last == limit )
then 1669 if ( max( abs(a1),abs(b2)) <= (1.0e+00+1.0e+03* epsilon( a1 ) )* &
1670 ( abs(a2) + 1.0e+03 * tiny( a2 ) ) )
then 1676 if ( error2 <= error1 )
then 1680 elist(maxerr) = error1
1681 elist(last) = error2
1686 rlist(maxerr) = area2
1688 elist(maxerr) = error2
1689 elist(last) = error1
1696 call qsort ( limit, last, maxerr, errmax, elist, iord, nrmax )
1698 if ( errsum <= errbnd )
go to 190
1700 if ( ier /= 0 )
then 1708 erlarg = erlarg - erlast
1710 if ( levcur+1 <= levmax )
then 1711 erlarg = erlarg + erro12
1717 if ( .not. extrap )
then 1719 if ( level(maxerr)+1 <= levmax )
then 1732 if ( ierro /= 3 .and. erlarg > ertest )
then 1736 if ( last > (2+limit/2) )
then 1737 jupbnd = limit+3-last
1741 maxerr = iord(nrmax)
1742 errmax = elist(maxerr)
1743 if ( level(maxerr)+1 <= levmax )
go to 160
1752 rlist2(numrl2) = area
1753 if ( numrl2 <= 2 )
go to 155
1754 call qextr ( numrl2, rlist2, reseps, abseps, res3la, nres )
1757 if ( ktmin > 5 .and. abserr < 1.0e-03*errsum )
then 1761 if ( abseps < abserr )
then 1767 ertest = max( epsabs,epsrel*abs(reseps))
1769 if ( abserr < ertest )
then 1777 if ( numrl2 == 1 )
then 1781 if ( ier >= 5 )
then 1788 errmax = elist(maxerr)
1800 if ( abserr == huge( abserr ) )
go to 190
1801 if ( (ier+ierro) == 0 )
go to 180
1803 if ( ierro == 3 )
then 1804 abserr = abserr+correc
1807 if ( ier == 0 )
then 1811 if ( result /= 0.0e+00.and.area /= 0.0e+00 )
go to 175
1812 if ( abserr > errsum )
go to 190
1813 if ( area == 0.0e+00 )
go to 210
1818 if ( abserr/abs(result) > errsum/abs(area) )
go to 190
1824 if ( ksgn == (-1) .and. max( abs(result),abs(area)) <= &
1825 resabs*1.0e-02 )
go to 210
1827 if ( 1.0e-02 > (result/area) .or. (result/area) > 1.0e+02 .or. &
1828 errsum > abs(area) )
then 1838 result = sum( rlist(1:last) )
1848 result = result * sign
1852 subroutine qags ( f, a, b, epsabs, epsrel, result, abserr, neval, ier )
1980 integer,
parameter :: limit = 500
1985 real(dp) alist(limit)
1993 real(dp) blist(limit)
2001 real(dp) elist(limit)
2014 real(dp),
external :: f
2037 real(dp) rlist(limit)
2057 if ( epsabs < 0.0e+00 .and. epsrel < 0.0e+00 )
then 2065 call qk21 ( f, a, b, result, abserr, defabs, resabs )
2069 dres = abs( result )
2070 errbnd = max( epsabs, epsrel * dres )
2076 if ( abserr <= 1.0e+02 * epsilon( defabs ) * defabs .and. &
2077 abserr > errbnd )
then 2081 if ( limit == 1 )
then 2085 if ( ier /= 0 .or. (abserr <= errbnd .and. abserr /= resabs ) .or. &
2086 abserr == 0.0e+00 )
go to 140
2095 abserr = huge( abserr )
2106 if ( dres >= (1.0e+00-5.0e+01* epsilon( defabs ) )*defabs )
then 2117 b1 = 5.0e-01*(alist(maxerr)+blist(maxerr))
2121 call qk21 ( f, a1, b1, area1, error1, resabs, defab1 )
2122 call qk21 ( f, a2, b2, area2, error2, resabs, defab2 )
2127 area12 = area1+area2
2128 erro12 = error1+error2
2129 errsum = errsum+erro12-errmax
2130 area = area+area12-rlist(maxerr)
2132 if ( defab1 == error1 .or. defab2 == error2 )
go to 15
2134 if ( abs( rlist(maxerr) - area12) > 1.0e-05 * abs(area12) &
2135 .or. erro12 < 9.9e-01 * errmax )
go to 10
2145 if ( last > 10.and.erro12 > errmax ) iroff3 = iroff3+1
2149 rlist(maxerr) = area1
2151 errbnd = max( epsabs,epsrel*abs(area))
2155 if ( iroff1+iroff2 >= 10 .or. iroff3 >= 20 )
then 2159 if ( iroff2 >= 5 ) ierro = 3
2164 if ( last == limit )
then 2171 if ( max( abs(a1),abs(b2)) <= (1.0e+00+1.0e+03* epsilon( a1 ) )* &
2172 (abs(a2)+1.0e+03* tiny( a2 ) ) )
then 2178 if ( error2 <= error1 )
then 2182 elist(maxerr) = error1
2183 elist(last) = error2
2188 rlist(maxerr) = area2
2190 elist(maxerr) = error2
2191 elist(last) = error1
2198 call qsort ( limit, last, maxerr, errmax, elist, iord, nrmax )
2200 if ( errsum <= errbnd )
go to 115
2202 if ( ier /= 0 )
then 2206 if ( last == 2 )
go to 80
2207 if ( noext )
go to 90
2209 erlarg = erlarg-erlast
2211 if ( abs(b1-a1) > small )
then 2212 erlarg = erlarg+erro12
2215 if ( extrap )
go to 40
2220 if ( abs(blist(maxerr)-alist(maxerr)) > small )
go to 90
2230 if ( ierro /= 3 .and. erlarg > ertest )
then 2235 if ( last > (2+limit/2) )
then 2236 jupbnd = limit+3-last
2240 maxerr = iord(nrmax)
2241 errmax = elist(maxerr)
2242 if ( abs(blist(maxerr)-alist(maxerr)) > small )
go to 90
2253 rlist2(numrl2) = area
2254 call qextr ( numrl2, rlist2, reseps, abseps, res3la, nres )
2257 if ( ktmin > 5 .and. abserr < 1.0e-03 * errsum )
then 2261 if ( abseps < abserr )
then 2267 ertest = max( epsabs,epsrel*abs(reseps))
2269 if ( abserr <= ertest )
then 2277 if ( numrl2 == 1 )
then 2281 if ( ier == 5 )
then 2286 errmax = elist(maxerr)
2289 small = small*5.0e-01
2295 small = abs(b-a)*3.75e-01
2306 if ( abserr == huge( abserr ) )
go to 115
2307 if ( ier+ierro == 0 )
go to 110
2309 if ( ierro == 3 )
then 2310 abserr = abserr+correc
2313 if ( ier == 0 ) ier = 3
2314 if ( result /= 0.0e+00.and.area /= 0.0e+00 )
go to 105
2315 if ( abserr > errsum )
go to 115
2316 if ( area == 0.0e+00 )
go to 130
2321 if ( abserr/abs(result) > errsum/abs(area) )
go to 115
2327 if ( ksgn == (-1).and.max( abs(result),abs(area)) <= &
2328 defabs*1.0e-02 )
go to 130
2330 if ( 1.0e-02 > (result/area) .or. (result/area) > 1.0e+02 &
2331 .or. errsum > abs(area) )
then 2341 result = sum( rlist(1:last) )
2347 if ( ier > 2 ) ier = ier-1
2355 subroutine qawc ( f, a, b, c, epsabs, epsrel, result, abserr, neval, ier )
2440 integer,
parameter :: limit = 500
2444 real(dp) alist(limit)
2446 real(dp) blist(limit)
2447 real(dp) elist(limit)
2451 real(dp),
external :: f
2458 real(dp) rlist(limit)
2460 call qawce ( f, a, b, c, epsabs, epsrel, limit, result, abserr, neval, ier, &
2461 alist, blist, rlist, elist, iord, last )
2465 subroutine qawce ( f, a, b, c, epsabs, epsrel, limit, result, abserr, neval, &
2466 ier, alist, blist, rlist, elist, iord, last )
2598 real(dp) alist(limit)
2607 real(dp) blist(limit)
2611 real(dp) elist(limit)
2620 real(dp),
external :: f
2633 real(dp) rlist(limit)
2651 else if ( c == b )
then 2654 else if ( epsabs < 0.0e+00 .and. epsrel < 0.0e+00 )
then 2670 call qc25c ( f, aa, bb, c, result, abserr, krule, neval )
2680 errbnd = max( epsabs, epsrel*abs(result) )
2682 if ( limit == 1 )
then 2687 if ( abserr < min( 1.0e-02*abs(result),errbnd) )
then 2709 b1 = 5.0e-01*(alist(maxerr)+blist(maxerr))
2711 if ( c <= b1 .and. c > a1 ) b1 = 5.0e-01*(c+b2)
2712 if ( c > b1 .and. c < b2 ) b1 = 5.0e-01*(a1+c)
2716 call qc25c ( f, a1, b1, c, area1, error1, krule, nev )
2719 call qc25c ( f, a2, b2, c, area2, error2, krule, nev )
2725 area12 = area1+area2
2726 erro12 = error1+error2
2727 errsum = errsum+erro12-errmax
2728 area = area+area12-rlist(maxerr)
2730 if ( abs(rlist(maxerr)-area12) < 1.0e-05*abs(area12) &
2731 .and.erro12 >= 9.9e-01*errmax .and. krule == 0 ) &
2734 if ( last > 10.and.erro12 > errmax .and. krule == 0 )
then 2738 rlist(maxerr) = area1
2740 errbnd = max( epsabs,epsrel*abs(area))
2742 if ( errsum > errbnd )
then 2746 if ( iroff1 >= 6 .and. iroff2 > 20 )
then 2753 if ( last == limit )
then 2760 if ( max( abs(a1), abs(b2) ) <= ( 1.0e+00 + 1.0e+03 * epsilon( a1 ) ) &
2761 *(abs(a2)+1.0e+03* tiny( a2 ) ))
then 2769 if ( error2 <= error1 )
then 2773 elist(maxerr) = error1
2774 elist(last) = error2
2779 rlist(maxerr) = area2
2781 elist(maxerr) = error2
2782 elist(last) = error1
2789 call qsort ( limit, last, maxerr, errmax, elist, iord, nrmax )
2791 if ( ier /= 0 .or. errsum <= errbnd )
then 2799 result = sum( rlist(1:last) )
2811 subroutine qawf ( f, a, omega, integr, epsabs, result, abserr, neval, ier )
2902 integer,
parameter :: limit = 500
2903 integer,
parameter :: limlst = 50
2904 integer,
parameter :: maxp1 = 21
2908 real(dp) alist(limit)
2909 real(dp) blist(limit)
2910 real(dp) chebmo(maxp1,25)
2911 real(dp) elist(limit)
2913 real(dp) erlst(limlst)
2914 real(dp),
external :: f
2918 integer ierlst(limlst)
2923 integer nnlog(limit)
2926 real(dp) rlist(limit)
2927 real(dp) rslst(limlst)
2935 if ( limlst < 3 .or. maxp1 < 1 )
then 2939 call qawfe ( f, a, omega, integr, epsabs, limlst, limit, maxp1, result, &
2940 abserr, neval, ier, rslst, erlst, ierlst, lst, alist, blist, rlist, &
2941 elist, iord, nnlog, chebmo )
2945 subroutine qawfe ( f, a, omega, integr, epsabs, limlst, limit, maxp1, &
2946 result, abserr, neval, ier, rslst, erlst, ierlst, lst, alist, blist, &
2947 rlist, elist, iord, nnlog, chebmo )
3153 real(dp) alist(limit)
3154 real(dp) blist(limit)
3155 real(dp) chebmo(maxp1,25)
3163 real(dp) elist(limit)
3168 real(dp) erlst(limlst)
3170 real(dp),
external :: f
3173 integer ierlst(limlst)
3183 integer nnlog(limit)
3187 real(dp),
parameter :: p = 0.9e+00
3188 real(dp),
parameter :: pi = 3.1415926535897932e+00
3194 real(dp) rlist(limit)
3195 real(dp) rslst(limlst)
3209 if ( (integr /= 1 .and. integr /= 2 ) .or. &
3210 epsabs <= 0.0e+00 .or. &
3216 if ( omega == 0.0e+00 )
then 3218 if ( integr == 1 )
then 3219 call qagi ( f, 0.0e+00_dp, 1, epsabs, 0.0e+00_dp, result, abserr, neval, ier )
3237 l = int(abs( omega ))
3239 cycle = dl * pi / abs( omega )
3250 if ( epsabs > tiny( epsabs ) / p1 )
then 3267 call qfour ( f, c1, c2, omega, integr, epsa, 0.0e+00_dp, limit, lst, maxp1, &
3268 rslst(lst), erlst(lst), nev, ierlst(lst), alist, blist, rlist, elist, &
3269 iord, nnlog, momcom, chebmo )
3273 errsum = errsum + erlst(lst)
3274 drl = 5.0e+01 * abs(rslst(lst))
3278 if ((errsum+drl) <= epsabs.and.lst >= 6)
go to 80
3280 correc = max( correc,erlst(lst))
3282 if ( ierlst(lst) /= 0 )
then 3283 eps = max( ep,correc*p1)
3287 if ( ier == 7 .and. (errsum+drl) <= correc*1.0e+01.and. lst > 5)
go to 80
3291 if ( lst <= 1 )
then 3296 psum(numrl2) = psum(ll)+rslst(lst)
3298 if ( lst == 2 )
then 3304 if ( lst == limlst )
then 3310 call qextr ( numrl2, psum, reseps, abseps, res3la, nres )
3316 if ( ktmin >= 15 .and. abserr <= 1.0e-03 * (errsum+drl) )
then 3320 if ( abseps <= abserr .or. lst == 3 )
then 3330 if ( ( abserr + 1.0e+01 * correc ) <= epsabs )
then 3334 if ( abserr <= epsabs .and. 1.0e+01 * correc >= epsabs )
then 3340 if ( ier /= 0 .and. ier /= 7 )
then 3356 abserr = abserr + 1.0e+01 * correc
3358 if ( ier == 0 )
then 3362 if ( result /= 0.0e+00 .and. psum(numrl2) /= 0.0e+00)
go to 70
3364 if ( abserr > errsum )
go to 80
3366 if ( psum(numrl2) == 0.0e+00 )
then 3372 if ( abserr / abs(result) <= (errsum+drl)/abs(psum(numrl2)) )
then 3374 if ( ier >= 1 .and. ier /= 7 )
then 3375 abserr = abserr + drl
3384 result = psum(numrl2)
3385 abserr = errsum + drl
3389 subroutine qawo ( f, a, b, omega, integr, epsabs, epsrel, result, abserr, &
3497 integer,
parameter :: limit = 500
3498 integer,
parameter :: maxp1 = 21
3502 real(dp) alist(limit)
3504 real(dp) blist(limit)
3505 real(dp) chebmo(maxp1,25)
3506 real(dp) elist(limit)
3509 real(dp),
external :: f
3517 integer nnlog(limit)
3520 real(dp) rlist(limit)
3522 call qfour ( f, a, b, omega, integr, epsabs, epsrel, limit, 1, maxp1, &
3523 result, abserr, neval, ier, alist, blist, rlist, elist, iord, nnlog, &
3528 subroutine qaws ( f, a, b, alfa, beta, integr, epsabs, epsrel, result, &
3529 abserr, neval, ier )
3622 integer,
parameter :: limit = 500
3627 real(dp) alist(limit)
3629 real(dp) blist(limit)
3631 real(dp) elist(limit)
3634 real(dp),
external :: f
3642 real(dp) rlist(limit)
3644 call qawse ( f, a, b, alfa, beta, integr, epsabs, epsrel, limit, result, &
3645 abserr, neval, ier, alist, blist, rlist, elist, iord, last )
3649 subroutine qawse ( f, a, b, alfa, beta, integr, epsabs, epsrel, limit, &
3650 result, abserr, neval, ier, alist, blist, rlist, elist, iord, last )
3788 real(dp) alist(limit)
3797 real(dp) blist(limit)
3801 real(dp) elist(limit)
3810 real(dp),
external :: f
3829 real(dp) rlist(limit)
3843 (epsabs < 0.0e+00 .and. epsrel < 0.0e+00) .or. &
3844 alfa <= (-1.0e+00) .or. &
3845 beta <= (-1.0e+00) .or. &
3855 call qmomo ( alfa, beta, ri, rj, rg, rh, integr )
3859 centre = 5.0e-01 * ( b + a )
3861 call qc25s ( f, a, b, a, centre, alfa, beta, ri, rj, rg, rh, area1, &
3862 error1, resas1, integr, nev )
3866 call qc25s ( f, a, b, centre, b, alfa, beta, ri, rj, rg, rh, area2, &
3867 error2, resas2, integr, nev )
3871 result = area1+area2
3872 abserr = error1+error2
3876 errbnd = max( epsabs, epsrel * abs( result ) )
3880 if ( error2 <= error1 )
then 3903 if ( limit == 2 )
then 3908 if ( abserr <= errbnd )
then 3925 b1 = 5.0e-01 * (alist(maxerr)+blist(maxerr))
3929 call qc25s ( f, a, b, a1, b1, alfa, beta, ri, rj, rg, rh, area1, &
3930 error1, resas1, integr, nev )
3934 call qc25s ( f, a, b, a2, b2, alfa, beta, ri, rj, rg, rh, area2, &
3935 error2, resas2, integr, nev )
3942 area12 = area1+area2
3943 erro12 = error1+error2
3944 errsum = errsum+erro12-errmax
3945 area = area+area12-rlist(maxerr)
3949 if ( a /= a1 .and. b /= b2 )
then 3951 if ( resas1 /= error1 .and. resas2 /= error2 )
then 3953 if ( abs(rlist(maxerr)-area12) < 1.0e-05*abs(area12) &
3954 .and.erro12 >= 9.9e-01*errmax)
then 3958 if ( last > 10.and.erro12 > errmax )
then 3966 rlist(maxerr) = area1
3971 errbnd = max( epsabs, epsrel * abs( area ) )
3973 if ( errsum > errbnd )
then 3978 if ( last == limit )
then 3984 if ( iroff1 >= 6 .or. iroff2 >= 20 )
then 3991 if ( max( abs(a1),abs(b2)) <= (1.0e+00+1.0e+03* epsilon( a1 ) )* &
3992 (abs(a2)+1.0e+03* tiny( a2) ))
then 4000 if ( error2 <= error1 )
then 4004 elist(maxerr) = error1
4005 elist(last) = error2
4010 rlist(maxerr) = area2
4012 elist(maxerr) = error2
4013 elist(last) = error1
4020 call qsort ( limit, last, maxerr, errmax, elist, iord, nrmax )
4022 if (ier /= 0 .or. errsum <= errbnd )
then 4030 result = sum( rlist(1:last) )
4036 subroutine qc25c ( f, a, b, c, result, abserr, krul, neval )
4113 real(dp),
external :: f
4132 real(dp),
parameter,
dimension ( 11 ) :: x = (/ &
4133 9.914448613738104e-01, 9.659258262890683e-01, &
4134 9.238795325112868e-01, 8.660254037844386e-01, &
4135 7.933533402912352e-01, 7.071067811865475e-01, &
4136 6.087614290087206e-01, 5.000000000000000e-01, &
4137 3.826834323650898e-01, 2.588190451025208e-01, &
4138 1.305261922200516e-01 /)
4142 cc = ( 2.0e+00 * c - b - a ) / ( b - a )
4146 if ( abs( cc ) >= 1.1e+00 )
then 4148 call qk15w ( f, qwgtc, c, p2, p3, p4, kp, a, b, result, abserr, &
4151 if ( resasc == abserr )
then 4159 hlgth = 5.0e-01 * ( b - a )
4160 centr = 5.0e-01 * ( b + a )
4162 fval(1) = 5.0e-01 * f(hlgth+centr)
4164 fval(25) = 5.0e-01 * f(centr-hlgth)
4169 fval(i) = f(u+centr)
4170 fval(isym) = f(centr-u)
4175 call qcheb ( x, fval, cheb12, cheb24 )
4180 amom0 = log( abs( ( 1.0e+00 - cc ) / ( 1.0e+00 + cc ) ) )
4181 amom1 = 2.0e+00 + cc * amom0
4182 res12 = cheb12(1) * amom0 + cheb12(2) * amom1
4183 res24 = cheb24(1) * amom0 + cheb24(2) * amom1
4186 amom2 = 2.0e+00 * cc * amom1 - amom0
4187 ak22 = ( k - 2 ) * ( k - 2 )
4188 if ( ( k / 2 ) * 2 == k )
then 4189 amom2 = amom2 - 4.0e+00 / ( ak22 - 1.0e+00 )
4191 res12 = res12 + cheb12(k) * amom2
4192 res24 = res24 + cheb24(k) * amom2
4198 amom2 = 2.0e+00 * cc * amom1 - amom0
4199 ak22 = ( k - 2 ) * ( k - 2 )
4200 if ( ( k / 2 ) * 2 == k )
then 4201 amom2 = amom2 - 4.0e+00 / ( ak22 - 1.0e+00 )
4203 res24 = res24 + cheb24(k) * amom2
4209 abserr = abs( res24 - res12 )
4213 subroutine qc25o ( f, a, b, omega, integr, nrmom, maxp1, ksave, result, &
4214 abserr, neval, resabs, resasc, momcom, chebmo )
4351 real(dp) chebmo(maxp1,25)
4363 real(dp),
external :: f
4375 integer,
parameter :: nmac = 28
4396 real(dp),
dimension ( 11 ) :: x = (/ &
4397 9.914448613738104e-01, 9.659258262890683e-01, &
4398 9.238795325112868e-01, 8.660254037844386e-01, &
4399 7.933533402912352e-01, 7.071067811865475e-01, &
4400 6.087614290087206e-01, 5.000000000000000e-01, &
4401 3.826834323650898e-01, 2.588190451025208e-01, &
4402 1.305261922200516e-01 /)
4404 centr = 5.0e-01*(b+a)
4405 hlgth = 5.0e-01*(b-a)
4406 parint = omega * hlgth
4414 if ( abs( parint ) <= 2.0e+00 )
then 4416 call qk15w ( f, qwgto, omega, p2, p3, p4, integr, a, b, result, &
4417 abserr, resabs, resasc )
4426 conc = hlgth * cos(centr*omega)
4427 cons = hlgth * sin(centr*omega)
4428 resasc = huge( resasc )
4434 if ( nrmom < momcom .or. ksave == 1 )
go to 140
4439 par2 = parint*parint
4440 par22 = par2+2.0e+00
4441 sinpar = sin(parint)
4442 cospar = cos(parint)
4446 v(1) = 2.0e+00*sinpar/parint
4447 v(2) = (8.0e+00*cospar+(par2+par2-8.0e+00)*sinpar/ parint)/par2
4448 v(3) = (3.2e+01*(par2-1.2e+01)*cospar+(2.0e+00* &
4449 ((par2-8.0e+01)*par2+1.92e+02)*sinpar)/ &
4452 as = 2.4e+01*parint*sinpar
4454 if ( abs( parint ) > 2.4e+01 )
then 4468 d(k) = -2.0e+00*(an2-4.0e+00)*(par22-an2-an2)
4469 d2(k) = (an-1.0e+00)*(an-2.0e+00)*par2
4470 d1(k) = (an+3.0e+00)*(an+4.0e+00)*par2
4471 v(k+3) = as-(an2-4.0e+00)*ac
4476 d(noequ) = -2.0e+00*(an2-4.0e+00)*(par22-an2-an2)
4477 v(noequ+3) = as-(an2-4.0e+00)*ac
4478 v(4) = v(4)-5.6e+01*par2*v(3)
4480 asap = (((((2.10e+02*par2-1.0e+00)*cospar-(1.05e+02*par2 &
4481 -6.3e+01)*ass)/an2-(1.0e+00-1.5e+01*par2)*cospar &
4482 +1.5e+01*ass)/an2-cospar+3.0e+00*ass)/an2-cospar)/an2
4483 v(noequ+3) = v(noequ+3)-2.0e+00*asap*par2*(an-1.0e+00)* &
4489 d3(1:noequ) = 0.0e+00
4495 if ( abs(d1(i)) > abs(d(i)) )
then 4509 d(i+1) = d(i+1)-d2(i)*d1(i)/d(i)
4510 d2(i+1) = d2(i+1)-d3(i)*d1(i)/d(i)
4511 v(i+4) = v(i+4)-v(i+3)*d1(i)/d(i)
4515 v(noequ+3) = v(noequ+3)/d(noequ)
4516 v(noequ+2) = (v(noequ+2)-d2(noeq1)*v(noequ+3))/d(noeq1)
4520 v(k+3) = (v(k+3)-d3(k)*v(k+5)-d2(k)*v(k+4))/d(k)
4533 v(i) = ((an2-4.0e+00)*(2.0e+00*(par22-an2-an2)*v(i-1)-ac) &
4534 +as-par2*(an+1.0e+00)*(an+2.0e+00)*v(i-2))/ &
4535 (par2*(an-1.0e+00)*(an-2.0e+00))
4542 chebmo(m,2*j-1) = v(j)
4547 v(1) = 2.0e+00*(sinpar-parint*cospar)/par2
4548 v(2) = (1.8e+01-4.8e+01/par2)*sinpar/par2 &
4549 +(-2.0e+00+4.8e+01/par2)*cospar/parint
4550 ac = -2.4e+01*parint*cospar
4551 as = -8.0e+00*sinpar
4555 if ( abs(parint) <= 2.4e+01 )
then 4559 chebmo(m,2*k) = -sinpar/(an*(2.0e+00*an-2.0e+00)) &
4560 -2.5e-01*parint*(v(k+1)/an-v(k)/(an-1.0e+00))
4571 v(i) = ((an2-4.0e+00)*(2.0e+00*(par22-an2-an2)*v(i-1)+as) &
4572 +ac-par2*(an+1.0e+00)*(an+2.0e+00)*v(i-2)) &
4573 /(par2*(an-1.0e+00)*(an-2.0e+00))
4575 chebmo(m,2*i) = v(i)
4582 if ( nrmom < momcom )
then 4586 if ( momcom < maxp1 - 1 .and. nrmom >= momcom )
then 4593 fval(1) = 5.0e-01*f(centr+hlgth)
4595 fval(25) = 5.0e-01*f(centr-hlgth)
4599 fval(i) = f(hlgth*x(i-1)+centr)
4600 fval(isym) = f(centr-hlgth*x(i-1))
4603 call qcheb ( x, fval, cheb12, cheb24 )
4607 resc12 = cheb12(13) * chebmo(m,13)
4609 estc = abs( cheb24(25)*chebmo(m,25))+abs((cheb12(13)- &
4610 cheb24(13))*chebmo(m,13) )
4615 resc12 = resc12+cheb12(k)*chebmo(m,k)
4616 ress12 = ress12+cheb12(k+1)*chebmo(m,k+1)
4617 estc = estc+abs((cheb12(k)-cheb24(k))*chebmo(m,k))
4618 ests = ests+abs((cheb12(k+1)-cheb24(k+1))*chebmo(m,k+1))
4622 resc24 = cheb24(25)*chebmo(m,25)
4624 resabs = abs(cheb24(25))
4629 resc24 = resc24+cheb24(k)*chebmo(m,k)
4630 ress24 = ress24+cheb24(k+1)*chebmo(m,k+1)
4631 resabs = resabs+abs(cheb24(k))+abs(cheb24(k+1))
4634 estc = estc+abs(cheb24(k)*chebmo(m,k))
4635 ests = ests+abs(cheb24(k+1)*chebmo(m,k+1))
4642 resabs = resabs * abs( hlgth )
4644 if ( integr == 1 )
then 4645 result = conc * resc24-cons*ress24
4646 abserr = abs( conc * estc ) + abs( cons * ests )
4648 result = conc*ress24+cons*resc24
4649 abserr = abs(conc*ests)+abs(cons*estc)
4654 subroutine qc25s ( f, a, b, bl, br, alfa, beta, ri, rj, rg, rh, result, &
4655 abserr, resasc, integr, neval )
4749 real(dp),
external :: f
4769 real(dp),
dimension ( 11 ) :: x = (/ &
4770 9.914448613738104e-01, 9.659258262890683e-01, &
4771 9.238795325112868e-01, 8.660254037844386e-01, &
4772 7.933533402912352e-01, 7.071067811865475e-01, &
4773 6.087614290087206e-01, 5.000000000000000e-01, &
4774 3.826834323650898e-01, 2.588190451025208e-01, &
4775 1.305261922200516e-01 /)
4779 if ( bl == a .and. (alfa /= 0.0e+00 .or. integr == 2 .or. integr == 4)) &
4782 if ( br == b .and. (beta /= 0.0e+00 .or. integr == 3 .or. integr == 4)) &
4787 call qk15w ( f, qwgts, a, b, alfa, beta, integr, bl, br, result, abserr, &
4800 hlgth = 5.0e-01*(br-bl)
4801 centr = 5.0e-01*(br+bl)
4803 fval(1) = 5.0e-01*f(hlgth+centr)*(fix-hlgth)**beta
4804 fval(13) = f(centr)*(fix**beta)
4805 fval(25) = 5.0e-01*f(centr-hlgth)*(fix+hlgth)**beta
4810 fval(i) = f(u+centr)*(fix-u)**beta
4811 fval(isym) = f(centr-u)*(fix+u)**beta
4814 factor = hlgth**(alfa+1.0e+00)
4820 if ( integr > 2 )
go to 70
4822 call qcheb ( x, fval, cheb12, cheb24 )
4827 res12 = res12+cheb12(i)*ri(i)
4828 res24 = res24+cheb24(i)*ri(i)
4832 res24 = res24 + cheb24(i) * ri(i)
4835 if ( integr == 1 )
go to 130
4841 abserr = abs((res24-res12)*dc)
4846 res12 = res12+cheb12(i)*rg(i)
4847 res24 = res24+cheb24(i)*rg(i)
4851 res24 = res24+cheb24(i)*rg(i)
4861 fval(1) = fval(1) * log( fix - hlgth )
4862 fval(13) = fval(13) * log( fix )
4863 fval(25) = fval(25) * log( fix + hlgth )
4868 fval(i) = fval(i) * log( fix - u )
4869 fval(isym) = fval(isym) * log( fix + u )
4872 call qcheb ( x, fval, cheb12, cheb24 )
4877 res12 = res12+cheb12(i)*ri(i)
4878 res24 = res24+cheb24(i)*ri(i)
4882 res24 = res24+cheb24(i)*ri(i)
4885 if ( integr == 3 )
go to 130
4891 abserr = abs((res24-res12)*dc)
4896 res12 = res12+cheb12(i)*rg(i)
4897 res24 = res24+cheb24(i)*rg(i)
4901 res24 = res24+cheb24(i)*rg(i)
4906 result = (result+res24)*factor
4907 abserr = (abserr+abs(res24-res12))*factor
4917 hlgth = 5.0e-01*(br-bl)
4918 centr = 5.0e-01*(br+bl)
4920 fval(1) = 5.0e-01*f(hlgth+centr)*(fix+hlgth)**alfa
4921 fval(13) = f(centr)*(fix**alfa)
4922 fval(25) = 5.0e-01*f(centr-hlgth)*(fix-hlgth)**alfa
4927 fval(i) = f(u+centr)*(fix+u)**alfa
4928 fval(isym) = f(centr-u)*(fix-u)**alfa
4931 factor = hlgth**(beta+1.0e+00)
4937 if ( integr == 2 .or. integr == 4 )
go to 200
4941 call qcheb ( x, fval, cheb12, cheb24 )
4944 res12 = res12+cheb12(i)*rj(i)
4945 res24 = res24+cheb24(i)*rj(i)
4949 res24 = res24+cheb24(i)*rj(i)
4952 if ( integr == 1 )
go to 260
4958 abserr = abs((res24-res12)*dc)
4963 res12 = res12+cheb12(i)*rh(i)
4964 res24 = res24+cheb24(i)*rh(i)
4968 res24 = res24+cheb24(i)*rh(i)
4978 fval(1) = fval(1) * log( hlgth + fix )
4979 fval(13) = fval(13) * log( fix )
4980 fval(25) = fval(25) * log( fix - hlgth )
4985 fval(i) = fval(i) * log(u+fix)
4986 fval(isym) = fval(isym) * log(fix-u)
4989 call qcheb ( x, fval, cheb12, cheb24 )
4994 res12 = res12+cheb12(i)*rj(i)
4995 res24 = res24+cheb24(i)*rj(i)
4999 res24 = res24+cheb24(i)*rj(i)
5002 if ( integr == 2 )
go to 260
5006 abserr = abs((res24-res12)*dc)
5013 res12 = res12+cheb12(i)*rh(i)
5014 res24 = res24+cheb24(i)*rh(i)
5018 res24 = res24+cheb24(i)*rh(i)
5023 result = (result+res24)*factor
5024 abserr = (abserr+abs(res24-res12))*factor
5030 subroutine qcheb ( x, fval, cheb12, cheb24 )
5089 v(i) = fval(i)-fval(j)
5090 fval(i) = fval(i)+fval(j)
5094 alam2 = x(6)*(v(3)-v(7)-v(11))
5095 cheb12(4) = alam1+alam2
5096 cheb12(10) = alam1-alam2
5097 alam1 = v(2)-v(8)-v(10)
5098 alam2 = v(4)-v(6)-v(12)
5099 alam = x(3)*alam1+x(9)*alam2
5100 cheb24(4) = cheb12(4)+alam
5101 cheb24(22) = cheb12(4)-alam
5102 alam = x(9)*alam1-x(3)*alam2
5103 cheb24(10) = cheb12(10)+alam
5104 cheb24(16) = cheb12(10)-alam
5108 alam1 = v(1)+part1+part2
5109 alam2 = x(2)*v(3)+part3+x(10)*v(11)
5110 cheb12(2) = alam1+alam2
5111 cheb12(12) = alam1-alam2
5112 alam = x(1)*v(2)+x(3)*v(4)+x(5)*v(6)+x(7)*v(8) &
5113 +x(9)*v(10)+x(11)*v(12)
5114 cheb24(2) = cheb12(2)+alam
5115 cheb24(24) = cheb12(2)-alam
5116 alam = x(11)*v(2)-x(9)*v(4)+x(7)*v(6)-x(5)*v(8) &
5117 +x(3)*v(10)-x(1)*v(12)
5118 cheb24(12) = cheb12(12)+alam
5119 cheb24(14) = cheb12(12)-alam
5120 alam1 = v(1)-part1+part2
5121 alam2 = x(10)*v(3)-part3+x(2)*v(11)
5122 cheb12(6) = alam1+alam2
5123 cheb12(8) = alam1-alam2
5124 alam = x(5)*v(2)-x(9)*v(4)-x(1)*v(6) &
5125 -x(11)*v(8)+x(3)*v(10)+x(7)*v(12)
5126 cheb24(6) = cheb12(6)+alam
5127 cheb24(20) = cheb12(6)-alam
5128 alam = x(7)*v(2)-x(3)*v(4)-x(11)*v(6)+x(1)*v(8) &
5129 -x(9)*v(10)-x(5)*v(12)
5130 cheb24(8) = cheb12(8)+alam
5131 cheb24(18) = cheb12(8)-alam
5135 v(i) = fval(i)-fval(j)
5136 fval(i) = fval(i)+fval(j)
5139 alam1 = v(1)+x(8)*v(5)
5141 cheb12(3) = alam1+alam2
5142 cheb12(11) = alam1-alam2
5143 cheb12(7) = v(1)-v(5)
5144 alam = x(2)*v(2)+x(6)*v(4)+x(10)*v(6)
5145 cheb24(3) = cheb12(3)+alam
5146 cheb24(23) = cheb12(3)-alam
5147 alam = x(6)*(v(2)-v(4)-v(6))
5148 cheb24(7) = cheb12(7)+alam
5149 cheb24(19) = cheb12(7)-alam
5150 alam = x(10)*v(2)-x(6)*v(4)+x(2)*v(6)
5151 cheb24(11) = cheb12(11)+alam
5152 cheb24(15) = cheb12(11)-alam
5156 v(i) = fval(i)-fval(j)
5157 fval(i) = fval(i)+fval(j)
5160 cheb12(5) = v(1)+x(8)*v(3)
5161 cheb12(9) = fval(1)-x(8)*fval(3)
5163 cheb24(5) = cheb12(5)+alam
5164 cheb24(21) = cheb12(5)-alam
5165 alam = x(8)*fval(2)-fval(4)
5166 cheb24(9) = cheb12(9)+alam
5167 cheb24(17) = cheb12(9)-alam
5168 cheb12(1) = fval(1)+fval(3)
5169 alam = fval(2)+fval(4)
5170 cheb24(1) = cheb12(1)+alam
5171 cheb24(25) = cheb12(1)-alam
5172 cheb12(13) = v(1)-v(3)
5173 cheb24(13) = cheb12(13)
5174 alam = 1.0e+00/6.0e+00
5177 cheb12(i) = cheb12(i)*alam
5181 cheb12(1) = cheb12(1)*alam
5182 cheb12(13) = cheb12(13)*alam
5185 cheb24(i) = cheb24(i)*alam
5188 cheb24(1) = 0.5e+00 * alam*cheb24(1)
5189 cheb24(25) = 0.5e+00 * alam*cheb24(25)
5193 subroutine qextr ( n, epstab, result, abserr, res3la, nres )
5290 abserr = huge( abserr )
5293 if ( n < 3 )
go to 100
5295 epstab(n+2) = epstab(n)
5297 epstab(n) = huge( epstab(n) )
5312 tol2 = max( abs(e2),e1abs)* epsilon( e2 )
5315 tol3 = max( e1abs,abs(e0))* epsilon( e0 )
5320 if ( err2 <= tol2 .and. err3 <= tol3 )
then 5330 tol1 = max( e1abs,abs(e3))* epsilon( e3 )
5335 if ( err1 <= tol1 .or. err2 <= tol2 .or. err3 <= tol3 )
go to 20
5337 ss = 1.0e+00/delta1+1.0e+00/delta2-1.0e+00/delta3
5338 epsinf = abs( ss*e1 )
5343 if ( epsinf > 1.0e-04 )
go to 30
5357 error = err2+abs(res-e2)+err3
5359 if ( error <= abserr )
then 5368 if ( n == limexp )
then 5372 if ( (num/2)*2 == num )
then 5382 epstab(ib) = epstab(ib2)
5386 if ( num /= n )
then 5391 epstab(i)= epstab(indx)
5397 if ( nres < 4 )
then 5398 res3la(nres) = result
5399 abserr = huge( abserr )
5401 abserr = abs(result-res3la(3))+abs(result-res3la(2)) &
5402 +abs(result-res3la(1))
5403 res3la(1) = res3la(2)
5404 res3la(2) = res3la(3)
5410 abserr = max( abserr,0.5e+00* epsilon( result ) *abs(result))
5414 subroutine qfour ( f, a, b, omega, integr, epsabs, epsrel, limit, icall, &
5415 maxp1, result, abserr, neval, ier, alist, blist, rlist, elist, iord, &
5416 nnlog, momcom, chebmo )
5630 real(dp) alist(limit)
5638 real(dp) blist(limit)
5641 real(dp) chebmo(maxp1,25)
5648 real(dp) elist(limit)
5662 real(dp),
external :: f
5681 integer nnlog(limit)
5692 real(dp) rlist(limit)
5715 if ( (integr /= 1.and.integr /= 2) .or. (epsabs < 0.0e+00.and. &
5716 epsrel < 0.0e+00) .or. icall < 1 .or. maxp1 < 1 )
then 5723 domega = abs( omega )
5726 if ( icall <= 1 )
then 5730 call qc25o ( f, a, b, domega, integr, nrmom, maxp1, 0, result, abserr, &
5731 neval, defabs, resabs, momcom, chebmo )
5736 errbnd = max( epsabs,epsrel*dres)
5740 if ( abserr <= 1.0e+02* epsilon( defabs ) *defabs .and. &
5741 abserr > errbnd ) ier = 2
5743 if ( limit == 1 )
then 5747 if ( ier /= 0 .or. abserr <= errbnd )
go to 200
5755 abserr = huge( abserr )
5764 small = abs(b-a)*7.5e-01
5769 if ( 5.0e-01*abs(b-a)*domega <= 2.0e+00)
then 5775 if ( 2.5e-01 * abs(b-a) * domega <= 2.0e+00 )
then 5779 if ( dres >= (1.0e+00-5.0e+01* epsilon( defabs ) )*defabs )
then 5787 do 140 last = 2, limit
5791 nrmom = nnlog(maxerr)+1
5793 b1 = 5.0e-01*(alist(maxerr)+blist(maxerr))
5798 call qc25o ( f, a1, b1, domega, integr, nrmom, maxp1, 0, area1, &
5799 error1, nev, resabs, defab1, momcom, chebmo )
5803 call qc25o ( f, a2, b2, domega, integr, nrmom, maxp1, 1, area2, &
5804 error2, nev, resabs, defab2, momcom, chebmo )
5811 area12 = area1+area2
5812 erro12 = error1+error2
5813 errsum = errsum+erro12-errmax
5814 area = area+area12-rlist(maxerr)
5815 if ( defab1 == error1 .or. defab2 == error2 )
go to 25
5816 if ( abs(rlist(maxerr)-area12) > 1.0e-05*abs(area12) &
5817 .or. erro12 < 9.9e-01*errmax )
go to 20
5818 if ( extrap ) iroff2 = iroff2+1
5820 if ( .not.extrap )
then 5826 if ( last > 10.and.erro12 > errmax ) iroff3 = iroff3+1
5830 rlist(maxerr) = area1
5832 nnlog(maxerr) = nrmom
5834 errbnd = max( epsabs,epsrel*abs(area))
5838 if ( iroff1+iroff2 >= 10 .or. iroff3 >= 20 ) ier = 2
5840 if ( iroff2 >= 5) ierro = 3
5845 if ( last == limit )
then 5852 if ( max( abs(a1),abs(b2)) <= (1.0e+00+1.0e+03* epsilon( a1 ) ) &
5853 *(abs(a2)+1.0e+03* tiny( a2 ) ))
then 5859 if ( error2 <= error1 )
then 5863 elist(maxerr) = error1
5864 elist(last) = error2
5869 rlist(maxerr) = area2
5871 elist(maxerr) = error2
5872 elist(last) = error1
5881 call qsort ( limit, last, maxerr, errmax, elist, iord, nrmax )
5883 if ( errsum <= errbnd )
then 5887 if ( ier /= 0 )
go to 150
5888 if ( last == 2 .and. extall )
go to 120
5889 if ( noext )
go to 140
5890 if ( .not. extall )
go to 50
5891 erlarg = erlarg-erlast
5892 if ( abs(b1-a1) > small ) erlarg = erlarg+erro12
5893 if ( extrap )
go to 70
5900 width = abs(blist(maxerr)-alist(maxerr))
5901 if ( width > small )
go to 140
5902 if ( extall )
go to 60
5908 small = small*5.0e-01
5909 if ( 2.5e-01*width*domega > 2.0e+00 )
go to 140
5920 if ( ierro == 3 .or. erlarg <= ertest )
go to 90
5928 if ( last > (limit/2+2) )
then 5929 jupbnd = limit+3-last
5935 maxerr = iord(nrmax)
5936 errmax = elist(maxerr)
5937 if ( abs(blist(maxerr)-alist(maxerr)) > small )
go to 140
5946 rlist2(numrl2) = area
5947 if ( numrl2 < 3 )
go to 110
5948 call qextr ( numrl2, rlist2, reseps, abseps, res3la, nres )
5951 if ( ktmin > 5.and.abserr < 1.0e-03*errsum )
then 5955 if ( abseps >= abserr )
go to 100
5960 ertest = max( epsabs, epsrel*abs(reseps))
5961 if ( abserr <= ertest )
go to 150
5967 if ( numrl2 == 1 ) noext = .true.
5968 if ( ier == 5 )
go to 150
5973 errmax = elist(maxerr)
5976 small = small*5.0e-01
5982 small = small * 5.0e-01
5984 rlist2(numrl2) = area
5997 if ( abserr == huge( abserr ) .or. nres == 0 )
go to 170
5998 if ( ier+ierro == 0 )
go to 165
5999 if ( ierro == 3 ) abserr = abserr+correc
6000 if ( ier == 0 ) ier = 3
6001 if ( result /= 0.0e+00.and.area /= 0.0e+00 )
go to 160
6002 if ( abserr > errsum )
go to 170
6003 if ( area == 0.0e+00 )
go to 190
6008 if ( abserr/abs(result) > errsum/abs(area) )
go to 170
6014 if ( ksgn == (-1) .and. max( abs(result),abs(area)) <= &
6015 defabs*1.0e-02 )
go to 190
6017 if ( 1.0e-02 > (result/area) .or. (result/area) > 1.0e+02 &
6018 .or. errsum >= abs(area) ) ier = 6
6026 result = sum( rlist(1:last) )
6032 if (ier > 2) ier=ier-1
6036 if ( integr == 2 .and. omega < 0.0e+00 )
then 6042 subroutine qk15 ( f, a, b, result, abserr, resabs, resasc )
6118 real(dp),
external :: f
6139 data xgk(1),xgk(2),xgk(3),xgk(4),xgk(5),xgk(6),xgk(7),xgk(8)/ &
6140 9.914553711208126e-01, 9.491079123427585e-01, &
6141 8.648644233597691e-01, 7.415311855993944e-01, &
6142 5.860872354676911e-01, 4.058451513773972e-01, &
6143 2.077849550078985e-01, 0.0e+00 /
6144 data wgk(1),wgk(2),wgk(3),wgk(4),wgk(5),wgk(6),wgk(7),wgk(8)/ &
6145 2.293532201052922e-02, 6.309209262997855e-02, &
6146 1.047900103222502e-01, 1.406532597155259e-01, &
6147 1.690047266392679e-01, 1.903505780647854e-01, &
6148 2.044329400752989e-01, 2.094821410847278e-01/
6149 data wg(1),wg(2),wg(3),wg(4)/ &
6150 1.294849661688697e-01, 2.797053914892767e-01, &
6151 3.818300505051189e-01, 4.179591836734694e-01/
6153 centr = 5.0e-01*(a+b)
6154 hlgth = 5.0e-01*(b-a)
6167 absc = hlgth*xgk(jtw)
6168 fval1 = f(centr-absc)
6169 fval2 = f(centr+absc)
6173 resg = resg+wg(j)*fsum
6174 resk = resk+wgk(jtw)*fsum
6175 resabs = resabs+wgk(jtw)*(abs(fval1)+abs(fval2))
6180 absc = hlgth*xgk(jtwm1)
6181 fval1 = f(centr-absc)
6182 fval2 = f(centr+absc)
6186 resk = resk+wgk(jtwm1)*fsum
6187 resabs = resabs+wgk(jtwm1)*(abs(fval1)+abs(fval2))
6190 reskh = resk * 5.0e-01
6191 resasc = wgk(8)*abs(fc-reskh)
6194 resasc = resasc+wgk(j)*(abs(fv1(j)-reskh)+abs(fv2(j)-reskh))
6198 resabs = resabs*dhlgth
6199 resasc = resasc*dhlgth
6200 abserr = abs((resk-resg)*hlgth)
6202 if ( resasc /= 0.0e+00.and.abserr /= 0.0e+00 )
then 6203 abserr = resasc*min( 1.0e+00,(2.0e+02*abserr/resasc)**1.5e+00)
6206 if ( resabs > tiny( resabs ) / (5.0e+01* epsilon( resabs ) ) )
then 6207 abserr = max(( epsilon( resabs ) *5.0e+01)*resabs,abserr)
6212 subroutine qk15i ( f, boun, inf, a, b, result, abserr, resabs, resasc )
6292 real(dp),
external :: f
6330 data xgk(1),xgk(2),xgk(3),xgk(4),xgk(5),xgk(6),xgk(7),xgk(8)/ &
6331 9.914553711208126e-01, 9.491079123427585e-01, &
6332 8.648644233597691e-01, 7.415311855993944e-01, &
6333 5.860872354676911e-01, 4.058451513773972e-01, &
6334 2.077849550078985e-01, 0.0000000000000000e+00/
6336 data wgk(1),wgk(2),wgk(3),wgk(4),wgk(5),wgk(6),wgk(7),wgk(8)/ &
6337 2.293532201052922e-02, 6.309209262997855e-02, &
6338 1.047900103222502e-01, 1.406532597155259e-01, &
6339 1.690047266392679e-01, 1.903505780647854e-01, &
6340 2.044329400752989e-01, 2.094821410847278e-01/
6342 data wg(1),wg(2),wg(3),wg(4),wg(5),wg(6),wg(7),wg(8)/ &
6343 0.0000000000000000e+00, 1.294849661688697e-01, &
6344 0.0000000000000000e+00, 2.797053914892767e-01, &
6345 0.0000000000000000e+00, 3.818300505051189e-01, &
6346 0.0000000000000000e+00, 4.179591836734694e-01/
6348 dinf = min( 1, inf )
6350 centr = 5.0e-01*(a+b)
6351 hlgth = 5.0e-01*(b-a)
6352 tabsc1 = boun+dinf*(1.0e+00-centr)/centr
6354 if ( inf == 2 ) fval1 = fval1+f(-tabsc1)
6355 fc = (fval1/centr)/centr
6369 tabsc1 = boun+dinf*(1.0e+00-absc1)/absc1
6370 tabsc2 = boun+dinf*(1.0e+00-absc2)/absc2
6374 if ( inf == 2 )
then 6375 fval1 = fval1+f(-tabsc1)
6376 fval2 = fval2+f(-tabsc2)
6379 fval1 = (fval1/absc1)/absc1
6380 fval2 = (fval2/absc2)/absc2
6384 resg = resg+wg(j)*fsum
6385 resk = resk+wgk(j)*fsum
6386 resabs = resabs+wgk(j)*(abs(fval1)+abs(fval2))
6389 reskh = resk * 5.0e-01
6390 resasc = wgk(8) * abs(fc-reskh)
6393 resasc = resasc + wgk(j)*(abs(fv1(j)-reskh)+abs(fv2(j)-reskh))
6396 result = resk * hlgth
6397 resasc = resasc * hlgth
6398 resabs = resabs * hlgth
6399 abserr = abs( ( resk - resg ) * hlgth )
6401 if ( resasc /= 0.0e+00.and.abserr /= 0.0e+00)
then 6402 abserr = resasc* min( 1.0e+00,(2.0e+02*abserr/resasc)**1.5e+00)
6405 if ( resabs > tiny( resabs ) / ( 5.0e+01 * epsilon( resabs ) ) )
then 6406 abserr = max(( epsilon( resabs ) *5.0e+01)*resabs,abserr)
6411 subroutine qk15w ( f, w, p1, p2, p3, p4, kp, a, b, result, abserr, resabs, &
6486 real(dp),
external :: f
6508 real(dp),
external :: w
6509 real(dp),
dimension ( 4 ) :: wg = (/ &
6510 1.294849661688697e-01, 2.797053914892767e-01, &
6511 3.818300505051889e-01, 4.179591836734694e-01 /)
6529 data xgk(1),xgk(2),xgk(3),xgk(4),xgk(5),xgk(6),xgk(7),xgk(8)/ &
6530 9.914553711208126e-01, 9.491079123427585e-01, &
6531 8.648644233597691e-01, 7.415311855993944e-01, &
6532 5.860872354676911e-01, 4.058451513773972e-01, &
6533 2.077849550789850e-01, 0.000000000000000e+00/
6535 data wgk(1),wgk(2),wgk(3),wgk(4),wgk(5),wgk(6),wgk(7),wgk(8)/ &
6536 2.293532201052922e-02, 6.309209262997855e-02, &
6537 1.047900103222502e-01, 1.406532597155259e-01, &
6538 1.690047266392679e-01, 1.903505780647854e-01, &
6539 2.044329400752989e-01, 2.094821410847278e-01/
6541 centr = 5.0e-01*(a+b)
6542 hlgth = 5.0e-01*(b-a)
6548 fc = f(centr)*w(centr,p1,p2,p3,p4,kp)
6555 absc = hlgth*xgk(jtw)
6558 fval1 = f(absc1)*w(absc1,p1,p2,p3,p4,kp)
6559 fval2 = f(absc2)*w(absc2,p1,p2,p3,p4,kp)
6563 resg = resg+wg(j)*fsum
6564 resk = resk+wgk(jtw)*fsum
6565 resabs = resabs+wgk(jtw)*(abs(fval1)+abs(fval2))
6570 absc = hlgth*xgk(jtwm1)
6573 fval1 = f(absc1)*w(absc1,p1,p2,p3,p4,kp)
6574 fval2 = f(absc2)*w(absc2,p1,p2,p3,p4,kp)
6578 resk = resk+wgk(jtwm1)*fsum
6579 resabs = resabs+wgk(jtwm1)*(abs(fval1)+abs(fval2))
6582 reskh = resk*5.0e-01
6583 resasc = wgk(8)*abs(fc-reskh)
6586 resasc = resasc+wgk(j)*(abs(fv1(j)-reskh)+abs(fv2(j)-reskh))
6590 resabs = resabs*dhlgth
6591 resasc = resasc*dhlgth
6592 abserr = abs((resk-resg)*hlgth)
6594 if ( resasc /= 0.0e+00.and.abserr /= 0.0e+00)
then 6595 abserr = resasc*min( 1.0e+00,(2.0e+02*abserr/resasc)**1.5e+00)
6598 if ( resabs > tiny( resabs ) /(5.0e+01* epsilon( resabs ) ) )
then 6599 abserr = max( ( epsilon( resabs ) * 5.0e+01)*resabs,abserr)
6604 subroutine qk21 ( f, a, b, result, abserr, resabs, resasc )
6655 real(dp),
external :: f
6690 data xgk(1),xgk(2),xgk(3),xgk(4),xgk(5),xgk(6),xgk(7),xgk(8), &
6691 xgk(9),xgk(10),xgk(11)/ &
6692 9.956571630258081e-01, 9.739065285171717e-01, &
6693 9.301574913557082e-01, 8.650633666889845e-01, &
6694 7.808177265864169e-01, 6.794095682990244e-01, &
6695 5.627571346686047e-01, 4.333953941292472e-01, &
6696 2.943928627014602e-01, 1.488743389816312e-01, &
6697 0.000000000000000e+00/
6699 data wgk(1),wgk(2),wgk(3),wgk(4),wgk(5),wgk(6),wgk(7),wgk(8), &
6700 wgk(9),wgk(10),wgk(11)/ &
6701 1.169463886737187e-02, 3.255816230796473e-02, &
6702 5.475589657435200e-02, 7.503967481091995e-02, &
6703 9.312545458369761e-02, 1.093871588022976e-01, &
6704 1.234919762620659e-01, 1.347092173114733e-01, &
6705 1.427759385770601e-01, 1.477391049013385e-01, &
6706 1.494455540029169e-01/
6708 data wg(1),wg(2),wg(3),wg(4),wg(5)/ &
6709 6.667134430868814e-02, 1.494513491505806e-01, &
6710 2.190863625159820e-01, 2.692667193099964e-01, &
6711 2.955242247147529e-01/
6725 centr = 5.0e-01*(a+b)
6726 hlgth = 5.0e-01*(b-a)
6739 absc = hlgth*xgk(jtw)
6740 fval1 = f(centr-absc)
6741 fval2 = f(centr+absc)
6745 resg = resg+wg(j)*fsum
6746 resk = resk+wgk(jtw)*fsum
6747 resabs = resabs+wgk(jtw)*(abs(fval1)+abs(fval2))
6752 absc = hlgth*xgk(jtwm1)
6753 fval1 = f(centr-absc)
6754 fval2 = f(centr+absc)
6758 resk = resk+wgk(jtwm1)*fsum
6759 resabs = resabs+wgk(jtwm1)*(abs(fval1)+abs(fval2))
6762 reskh = resk*5.0e-01
6763 resasc = wgk(11)*abs(fc-reskh)
6766 resasc = resasc+wgk(j)*(abs(fv1(j)-reskh)+abs(fv2(j)-reskh))
6770 resabs = resabs*dhlgth
6771 resasc = resasc*dhlgth
6772 abserr = abs((resk-resg)*hlgth)
6774 if ( resasc /= 0.0e+00.and.abserr /= 0.0e+00)
then 6775 abserr = resasc*min( 1.0e+00,(2.0e+02*abserr/resasc)**1.5e+00)
6778 if ( resabs > tiny( resabs ) /(5.0e+01* epsilon( resabs ) ))
then 6779 abserr = max(( epsilon( resabs ) *5.0e+01)*resabs,abserr)
6784 subroutine qk31 ( f, a, b, result, abserr, resabs, resasc )
6836 real(dp),
external :: f
6871 data xgk(1),xgk(2),xgk(3),xgk(4),xgk(5),xgk(6),xgk(7),xgk(8), &
6872 xgk(9),xgk(10),xgk(11),xgk(12),xgk(13),xgk(14),xgk(15),xgk(16)/ &
6873 9.980022986933971e-01, 9.879925180204854e-01, &
6874 9.677390756791391e-01, 9.372733924007059e-01, &
6875 8.972645323440819e-01, 8.482065834104272e-01, &
6876 7.904185014424659e-01, 7.244177313601700e-01, &
6877 6.509967412974170e-01, 5.709721726085388e-01, &
6878 4.850818636402397e-01, 3.941513470775634e-01, &
6879 2.991800071531688e-01, 2.011940939974345e-01, &
6880 1.011420669187175e-01, 0.0e+00 /
6881 data wgk(1),wgk(2),wgk(3),wgk(4),wgk(5),wgk(6),wgk(7),wgk(8), &
6882 wgk(9),wgk(10),wgk(11),wgk(12),wgk(13),wgk(14),wgk(15),wgk(16)/ &
6883 5.377479872923349e-03, 1.500794732931612e-02, &
6884 2.546084732671532e-02, 3.534636079137585e-02, &
6885 4.458975132476488e-02, 5.348152469092809e-02, &
6886 6.200956780067064e-02, 6.985412131872826e-02, &
6887 7.684968075772038e-02, 8.308050282313302e-02, &
6888 8.856444305621177e-02, 9.312659817082532e-02, &
6889 9.664272698362368e-02, 9.917359872179196e-02, &
6890 1.007698455238756e-01, 1.013300070147915e-01/
6891 data wg(1),wg(2),wg(3),wg(4),wg(5),wg(6),wg(7),wg(8)/ &
6892 3.075324199611727e-02, 7.036604748810812e-02, &
6893 1.071592204671719e-01, 1.395706779261543e-01, &
6894 1.662692058169939e-01, 1.861610000155622e-01, &
6895 1.984314853271116e-01, 2.025782419255613e-01/
6909 centr = 5.0e-01*(a+b)
6910 hlgth = 5.0e-01*(b-a)
6923 absc = hlgth*xgk(jtw)
6924 fval1 = f(centr-absc)
6925 fval2 = f(centr+absc)
6929 resg = resg+wg(j)*fsum
6930 resk = resk+wgk(jtw)*fsum
6931 resabs = resabs+wgk(jtw)*(abs(fval1)+abs(fval2))
6936 absc = hlgth*xgk(jtwm1)
6937 fval1 = f(centr-absc)
6938 fval2 = f(centr+absc)
6942 resk = resk+wgk(jtwm1)*fsum
6943 resabs = resabs+wgk(jtwm1)*(abs(fval1)+abs(fval2))
6946 reskh = resk*5.0e-01
6947 resasc = wgk(16)*abs(fc-reskh)
6950 resasc = resasc+wgk(j)*(abs(fv1(j)-reskh)+abs(fv2(j)-reskh))
6954 resabs = resabs*dhlgth
6955 resasc = resasc*dhlgth
6956 abserr = abs((resk-resg)*hlgth)
6958 if ( resasc /= 0.0e+00.and.abserr /= 0.0e+00) &
6959 abserr = resasc*min( 1.0e+00,(2.0e+02*abserr/resasc)**1.5e+00)
6961 if ( resabs > tiny( resabs ) /(5.0e+01* epsilon( resabs ) ))
then 6962 abserr = max(( epsilon( resabs ) *5.0e+01)*resabs,abserr)
6967 subroutine qk41 ( f, a, b, result, abserr, resabs, resasc )
7030 real(dp),
external :: f
7065 data xgk(1),xgk(2),xgk(3),xgk(4),xgk(5),xgk(6),xgk(7),xgk(8), &
7066 xgk(9),xgk(10),xgk(11),xgk(12),xgk(13),xgk(14),xgk(15),xgk(16), &
7067 xgk(17),xgk(18),xgk(19),xgk(20),xgk(21)/ &
7068 9.988590315882777e-01, 9.931285991850949e-01, &
7069 9.815078774502503e-01, 9.639719272779138e-01, &
7070 9.408226338317548e-01, 9.122344282513259e-01, &
7071 8.782768112522820e-01, 8.391169718222188e-01, &
7072 7.950414288375512e-01, 7.463319064601508e-01, &
7073 6.932376563347514e-01, 6.360536807265150e-01, &
7074 5.751404468197103e-01, 5.108670019508271e-01, &
7075 4.435931752387251e-01, 3.737060887154196e-01, &
7076 3.016278681149130e-01, 2.277858511416451e-01, &
7077 1.526054652409227e-01, 7.652652113349733e-02, &
7079 data wgk(1),wgk(2),wgk(3),wgk(4),wgk(5),wgk(6),wgk(7),wgk(8), &
7080 wgk(9),wgk(10),wgk(11),wgk(12),wgk(13),wgk(14),wgk(15),wgk(16), &
7081 wgk(17),wgk(18),wgk(19),wgk(20),wgk(21)/ &
7082 3.073583718520532e-03, 8.600269855642942e-03, &
7083 1.462616925697125e-02, 2.038837346126652e-02, &
7084 2.588213360495116e-02, 3.128730677703280e-02, &
7085 3.660016975820080e-02, 4.166887332797369e-02, &
7086 4.643482186749767e-02, 5.094457392372869e-02, &
7087 5.519510534828599e-02, 5.911140088063957e-02, &
7088 6.265323755478117e-02, 6.583459713361842e-02, &
7089 6.864867292852162e-02, 7.105442355344407e-02, &
7090 7.303069033278667e-02, 7.458287540049919e-02, &
7091 7.570449768455667e-02, 7.637786767208074e-02, &
7092 7.660071191799966e-02/
7093 data wg(1),wg(2),wg(3),wg(4),wg(5),wg(6),wg(7),wg(8),wg(9),wg(10)/ &
7094 1.761400713915212e-02, 4.060142980038694e-02, &
7095 6.267204833410906e-02, 8.327674157670475e-02, &
7096 1.019301198172404e-01, 1.181945319615184e-01, &
7097 1.316886384491766e-01, 1.420961093183821e-01, &
7098 1.491729864726037e-01, 1.527533871307259e-01/
7100 centr = 5.0e-01*(a+b)
7101 hlgth = 5.0e-01*(b-a)
7114 absc = hlgth*xgk(jtw)
7115 fval1 = f(centr-absc)
7116 fval2 = f(centr+absc)
7120 resg = resg+wg(j)*fsum
7121 resk = resk+wgk(jtw)*fsum
7122 resabs = resabs+wgk(jtw)*(abs(fval1)+abs(fval2))
7127 absc = hlgth*xgk(jtwm1)
7128 fval1 = f(centr-absc)
7129 fval2 = f(centr+absc)
7133 resk = resk+wgk(jtwm1)*fsum
7134 resabs = resabs+wgk(jtwm1)*(abs(fval1)+abs(fval2))
7137 reskh = resk*5.0e-01
7138 resasc = wgk(21)*abs(fc-reskh)
7141 resasc = resasc+wgk(j)*(abs(fv1(j)-reskh)+abs(fv2(j)-reskh))
7145 resabs = resabs*dhlgth
7146 resasc = resasc*dhlgth
7147 abserr = abs((resk-resg)*hlgth)
7149 if ( resasc /= 0.0e+00.and.abserr /= 0.0e+00) &
7150 abserr = resasc*min( 1.0e+00,(2.0e+02*abserr/resasc)**1.5e+00)
7152 if ( resabs > tiny( resabs ) /(5.0e+01* epsilon( resabs ) ))
then 7153 abserr = max(( epsilon( resabs ) *5.0e+01)*resabs,abserr)
7158 subroutine qk51 ( f, a, b, result, abserr, resabs, resasc )
7220 real(dp),
external :: f
7255 data xgk(1),xgk(2),xgk(3),xgk(4),xgk(5),xgk(6),xgk(7),xgk(8), &
7256 xgk(9),xgk(10),xgk(11),xgk(12),xgk(13),xgk(14)/ &
7257 9.992621049926098e-01, 9.955569697904981e-01, &
7258 9.880357945340772e-01, 9.766639214595175e-01, &
7259 9.616149864258425e-01, 9.429745712289743e-01, &
7260 9.207471152817016e-01, 8.949919978782754e-01, &
7261 8.658470652932756e-01, 8.334426287608340e-01, &
7262 7.978737979985001e-01, 7.592592630373576e-01, &
7263 7.177664068130844e-01, 6.735663684734684e-01/
7264 data xgk(15),xgk(16),xgk(17),xgk(18),xgk(19),xgk(20),xgk(21), &
7265 xgk(22),xgk(23),xgk(24),xgk(25),xgk(26)/ &
7266 6.268100990103174e-01, 5.776629302412230e-01, &
7267 5.263252843347192e-01, 4.730027314457150e-01, &
7268 4.178853821930377e-01, 3.611723058093878e-01, &
7269 3.030895389311078e-01, 2.438668837209884e-01, &
7270 1.837189394210489e-01, 1.228646926107104e-01, &
7271 6.154448300568508e-02, 0.0e+00 /
7272 data wgk(1),wgk(2),wgk(3),wgk(4),wgk(5),wgk(6),wgk(7),wgk(8), &
7273 wgk(9),wgk(10),wgk(11),wgk(12),wgk(13),wgk(14)/ &
7274 1.987383892330316e-03, 5.561932135356714e-03, &
7275 9.473973386174152e-03, 1.323622919557167e-02, &
7276 1.684781770912830e-02, 2.043537114588284e-02, &
7277 2.400994560695322e-02, 2.747531758785174e-02, &
7278 3.079230016738749e-02, 3.400213027432934e-02, &
7279 3.711627148341554e-02, 4.008382550403238e-02, &
7280 4.287284502017005e-02, 4.550291304992179e-02/
7281 data wgk(15),wgk(16),wgk(17),wgk(18),wgk(19),wgk(20),wgk(21), &
7282 wgk(22),wgk(23),wgk(24),wgk(25),wgk(26)/ &
7283 4.798253713883671e-02, 5.027767908071567e-02, &
7284 5.236288580640748e-02, 5.425112988854549e-02, &
7285 5.595081122041232e-02, 5.743711636156783e-02, &
7286 5.868968002239421e-02, 5.972034032417406e-02, &
7287 6.053945537604586e-02, 6.112850971705305e-02, &
7288 6.147118987142532e-02, 6.158081806783294e-02/
7289 data wg(1),wg(2),wg(3),wg(4),wg(5),wg(6),wg(7),wg(8),wg(9),wg(10), &
7290 wg(11),wg(12),wg(13)/ &
7291 1.139379850102629e-02, 2.635498661503214e-02, &
7292 4.093915670130631e-02, 5.490469597583519e-02, &
7293 6.803833381235692e-02, 8.014070033500102e-02, &
7294 9.102826198296365e-02, 1.005359490670506e-01, &
7295 1.085196244742637e-01, 1.148582591457116e-01, &
7296 1.194557635357848e-01, 1.222424429903100e-01, &
7297 1.231760537267155e-01/
7299 centr = 5.0e-01*(a+b)
7300 hlgth = 5.0e-01*(b-a)
7313 absc = hlgth*xgk(jtw)
7314 fval1 = f(centr-absc)
7315 fval2 = f(centr+absc)
7319 resg = resg+wg(j)*fsum
7320 resk = resk+wgk(jtw)*fsum
7321 resabs = resabs+wgk(jtw)*(abs(fval1)+abs(fval2))
7326 absc = hlgth*xgk(jtwm1)
7327 fval1 = f(centr-absc)
7328 fval2 = f(centr+absc)
7332 resk = resk+wgk(jtwm1)*fsum
7333 resabs = resabs+wgk(jtwm1)*(abs(fval1)+abs(fval2))
7336 reskh = resk*5.0e-01
7337 resasc = wgk(26)*abs(fc-reskh)
7340 resasc = resasc+wgk(j)*(abs(fv1(j)-reskh)+abs(fv2(j)-reskh))
7344 resabs = resabs*dhlgth
7345 resasc = resasc*dhlgth
7346 abserr = abs((resk-resg)*hlgth)
7348 if ( resasc /= 0.0e+00.and.abserr /= 0.0e+00)
then 7349 abserr = resasc*min( 1.0e+00,(2.0e+02*abserr/resasc)**1.5e+00)
7352 if ( resabs > tiny( resabs ) / (5.0e+01* epsilon( resabs ) ) )
then 7353 abserr = max(( epsilon( resabs ) *5.0e+01)*resabs,abserr)
7358 subroutine qk61 ( f, a, b, result, abserr, resabs, resasc )
7420 real(dp),
external :: f
7455 data xgk(1),xgk(2),xgk(3),xgk(4),xgk(5),xgk(6),xgk(7),xgk(8), &
7457 9.994844100504906e-01, 9.968934840746495e-01, &
7458 9.916309968704046e-01, 9.836681232797472e-01, &
7459 9.731163225011263e-01, 9.600218649683075e-01, &
7460 9.443744447485600e-01, 9.262000474292743e-01, &
7461 9.055733076999078e-01, 8.825605357920527e-01/
7462 data xgk(11),xgk(12),xgk(13),xgk(14),xgk(15),xgk(16),xgk(17), &
7463 xgk(18),xgk(19),xgk(20)/ &
7464 8.572052335460611e-01, 8.295657623827684e-01, &
7465 7.997278358218391e-01, 7.677774321048262e-01, &
7466 7.337900624532268e-01, 6.978504947933158e-01, &
7467 6.600610641266270e-01, 6.205261829892429e-01, &
7468 5.793452358263617e-01, 5.366241481420199e-01/
7469 data xgk(21),xgk(22),xgk(23),xgk(24),xgk(25),xgk(26),xgk(27), &
7470 xgk(28),xgk(29),xgk(30),xgk(31)/ &
7471 4.924804678617786e-01, 4.470337695380892e-01, &
7472 4.004012548303944e-01, 3.527047255308781e-01, &
7473 3.040732022736251e-01, 2.546369261678898e-01, &
7474 2.045251166823099e-01, 1.538699136085835e-01, &
7475 1.028069379667370e-01, 5.147184255531770e-02, &
7477 data wgk(1),wgk(2),wgk(3),wgk(4),wgk(5),wgk(6),wgk(7),wgk(8), &
7479 1.389013698677008e-03, 3.890461127099884e-03, &
7480 6.630703915931292e-03, 9.273279659517763e-03, &
7481 1.182301525349634e-02, 1.436972950704580e-02, &
7482 1.692088918905327e-02, 1.941414119394238e-02, &
7483 2.182803582160919e-02, 2.419116207808060e-02/
7484 data wgk(11),wgk(12),wgk(13),wgk(14),wgk(15),wgk(16),wgk(17), &
7485 wgk(18),wgk(19),wgk(20)/ &
7486 2.650995488233310e-02, 2.875404876504129e-02, &
7487 3.090725756238776e-02, 3.298144705748373e-02, &
7488 3.497933802806002e-02, 3.688236465182123e-02, &
7489 3.867894562472759e-02, 4.037453895153596e-02, &
7490 4.196981021516425e-02, 4.345253970135607e-02/
7491 data wgk(21),wgk(22),wgk(23),wgk(24),wgk(25),wgk(26),wgk(27), &
7492 wgk(28),wgk(29),wgk(30),wgk(31)/ &
7493 4.481480013316266e-02, 4.605923827100699e-02, &
7494 4.718554656929915e-02, 4.818586175708713e-02, &
7495 4.905543455502978e-02, 4.979568342707421e-02, &
7496 5.040592140278235e-02, 5.088179589874961e-02, &
7497 5.122154784925877e-02, 5.142612853745903e-02, &
7498 5.149472942945157e-02/
7499 data wg(1),wg(2),wg(3),wg(4),wg(5),wg(6),wg(7),wg(8)/ &
7500 7.968192496166606e-03, 1.846646831109096e-02, &
7501 2.878470788332337e-02, 3.879919256962705e-02, &
7502 4.840267283059405e-02, 5.749315621761907e-02, &
7503 6.597422988218050e-02, 7.375597473770521e-02/
7504 data wg(9),wg(10),wg(11),wg(12),wg(13),wg(14),wg(15)/ &
7505 8.075589522942022e-02, 8.689978720108298e-02, &
7506 9.212252223778613e-02, 9.636873717464426e-02, &
7507 9.959342058679527e-02, 1.017623897484055e-01, &
7508 1.028526528935588e-01/
7510 centr = 5.0e-01*(b+a)
7511 hlgth = 5.0e-01*(b-a)
7524 absc = hlgth*xgk(jtw)
7525 fval1 = f(centr-absc)
7526 fval2 = f(centr+absc)
7530 resg = resg+wg(j)*fsum
7531 resk = resk+wgk(jtw)*fsum
7532 resabs = resabs+wgk(jtw)*(abs(fval1)+abs(fval2))
7537 absc = hlgth*xgk(jtwm1)
7538 fval1 = f(centr-absc)
7539 fval2 = f(centr+absc)
7543 resk = resk+wgk(jtwm1)*fsum
7544 resabs = resabs+wgk(jtwm1)*(abs(fval1)+abs(fval2))
7547 reskh = resk * 5.0e-01
7548 resasc = wgk(31)*abs(fc-reskh)
7551 resasc = resasc+wgk(j)*(abs(fv1(j)-reskh)+abs(fv2(j)-reskh))
7555 resabs = resabs*dhlgth
7556 resasc = resasc*dhlgth
7557 abserr = abs((resk-resg)*hlgth)
7559 if ( resasc /= 0.0e+00 .and. abserr /= 0.0e+00)
then 7560 abserr = resasc*min( 1.0e+00,(2.0e+02*abserr/resasc)**1.5e+00)
7563 if ( resabs > tiny( resabs ) / (5.0e+01* epsilon( resabs ) ))
then 7564 abserr = max( ( epsilon( resabs ) *5.0e+01)*resabs, abserr )
7570 subroutine qmomo ( alfa, beta, ri, rj, rg, rh, integr )
7644 alfp1 = alfa+1.0e+00
7645 betp1 = beta+1.0e+00
7646 alfp2 = alfa+2.0e+00
7647 betp2 = beta+2.0e+00
7648 ralf = 2.0e+00**alfp1
7649 rbet = 2.0e+00**betp1
7655 ri(2) = ri(1)*alfa/alfp2
7656 rj(2) = rj(1)*beta/betp2
7661 ri(i) = -(ralf+an*(an-alfp2)*ri(i-1))/(anm1*(an+alfp1))
7662 rj(i) = -(rbet+an*(an-betp2)*rj(i-1))/(anm1*(an+betp1))
7667 if ( integr == 1 )
go to 70
7668 if ( integr == 3 )
go to 40
7672 rg(1) = -ri(1)/alfp1
7673 rg(2) = -(ralf+ralf)/(alfp2*alfp2)-rg(1)
7679 rg(i) = -(an*(an-alfp2)*rg(im1)-an*ri(im1)+anm1*ri(i))/ &
7686 if ( integr == 2 )
go to 70
7692 rh(1) = -rj(1) / betp1
7693 rh(2) = -(rbet+rbet)/(betp2*betp2)-rh(1)
7699 rh(i) = -(an*(an-betp2)*rh(im1)-an*rj(im1)+ &
7700 anm1*rj(i))/(anm1*(an+betp1))
7720 subroutine qng ( f, a, b, epsabs, epsrel, result, abserr, neval, ier )
7807 real(dp),
external :: f
7860 data x1(1),x1(2),x1(3),x1(4),x1(5)/ &
7861 9.739065285171717e-01, 8.650633666889845e-01, &
7862 6.794095682990244e-01, 4.333953941292472e-01, &
7863 1.488743389816312e-01/
7864 data x2(1),x2(2),x2(3),x2(4),x2(5)/ &
7865 9.956571630258081e-01, 9.301574913557082e-01, &
7866 7.808177265864169e-01, 5.627571346686047e-01, &
7867 2.943928627014602e-01/
7868 data x3(1),x3(2),x3(3),x3(4),x3(5),x3(6),x3(7),x3(8),x3(9),x3(10), &
7870 9.993333609019321e-01, 9.874334029080889e-01, &
7871 9.548079348142663e-01, 9.001486957483283e-01, &
7872 8.251983149831142e-01, 7.321483889893050e-01, &
7873 6.228479705377252e-01, 4.994795740710565e-01, &
7874 3.649016613465808e-01, 2.222549197766013e-01, &
7875 7.465061746138332e-02/
7876 data x4(1),x4(2),x4(3),x4(4),x4(5),x4(6),x4(7),x4(8),x4(9),x4(10), &
7877 x4(11),x4(12),x4(13),x4(14),x4(15),x4(16),x4(17),x4(18),x4(19), &
7878 x4(20),x4(21),x4(22)/ 9.999029772627292e-01, &
7879 9.979898959866787e-01, 9.921754978606872e-01, &
7880 9.813581635727128e-01, 9.650576238583846e-01, &
7881 9.431676131336706e-01, 9.158064146855072e-01, &
7882 8.832216577713165e-01, 8.457107484624157e-01, &
7883 8.035576580352310e-01, 7.570057306854956e-01, &
7884 7.062732097873218e-01, 6.515894665011779e-01, &
7885 5.932233740579611e-01, 5.314936059708319e-01, &
7886 4.667636230420228e-01, 3.994248478592188e-01, &
7887 3.298748771061883e-01, 2.585035592021616e-01, &
7888 1.856953965683467e-01, 1.118422131799075e-01, &
7889 3.735212339461987e-02/
7890 data w10(1),w10(2),w10(3),w10(4),w10(5)/ &
7891 6.667134430868814e-02, 1.494513491505806e-01, &
7892 2.190863625159820e-01, 2.692667193099964e-01, &
7893 2.955242247147529e-01/
7894 data w21a(1),w21a(2),w21a(3),w21a(4),w21a(5)/ &
7895 3.255816230796473e-02, 7.503967481091995e-02, &
7896 1.093871588022976e-01, 1.347092173114733e-01, &
7897 1.477391049013385e-01/
7898 data w21b(1),w21b(2),w21b(3),w21b(4),w21b(5),w21b(6)/ &
7899 1.169463886737187e-02, 5.475589657435200e-02, &
7900 9.312545458369761e-02, 1.234919762620659e-01, &
7901 1.427759385770601e-01, 1.494455540029169e-01/
7902 data w43a(1),w43a(2),w43a(3),w43a(4),w43a(5),w43a(6),w43a(7), &
7903 w43a(8),w43a(9),w43a(10)/ 1.629673428966656e-02, &
7904 3.752287612086950e-02, 5.469490205825544e-02, &
7905 6.735541460947809e-02, 7.387019963239395e-02, &
7906 5.768556059769796e-03, 2.737189059324884e-02, &
7907 4.656082691042883e-02, 6.174499520144256e-02, &
7908 7.138726726869340e-02/
7909 data w43b(1),w43b(2),w43b(3),w43b(4),w43b(5),w43b(6),w43b(7), &
7910 w43b(8),w43b(9),w43b(10),w43b(11),w43b(12)/ &
7911 1.844477640212414e-03, 1.079868958589165e-02, &
7912 2.189536386779543e-02, 3.259746397534569e-02, &
7913 4.216313793519181e-02, 5.074193960018458e-02, &
7914 5.837939554261925e-02, 6.474640495144589e-02, &
7915 6.956619791235648e-02, 7.282444147183321e-02, &
7916 7.450775101417512e-02, 7.472214751740301e-02/
7917 data w87a(1),w87a(2),w87a(3),w87a(4),w87a(5),w87a(6),w87a(7), &
7918 w87a(8),w87a(9),w87a(10),w87a(11),w87a(12),w87a(13),w87a(14), &
7919 w87a(15),w87a(16),w87a(17),w87a(18),w87a(19),w87a(20),w87a(21)/ &
7920 8.148377384149173e-03, 1.876143820156282e-02, &
7921 2.734745105005229e-02, 3.367770731163793e-02, &
7922 3.693509982042791e-02, 2.884872430211531e-03, &
7923 1.368594602271270e-02, 2.328041350288831e-02, &
7924 3.087249761171336e-02, 3.569363363941877e-02, &
7925 9.152833452022414e-04, 5.399280219300471e-03, &
7926 1.094767960111893e-02, 1.629873169678734e-02, &
7927 2.108156888920384e-02, 2.537096976925383e-02, &
7928 2.918969775647575e-02, 3.237320246720279e-02, &
7929 3.478309895036514e-02, 3.641222073135179e-02, &
7930 3.725387550304771e-02/
7931 data w87b(1),w87b(2),w87b(3),w87b(4),w87b(5),w87b(6),w87b(7), &
7932 w87b(8),w87b(9),w87b(10),w87b(11),w87b(12),w87b(13),w87b(14), &
7933 w87b(15),w87b(16),w87b(17),w87b(18),w87b(19),w87b(20),w87b(21), &
7934 w87b(22),w87b(23)/ 2.741455637620724e-04, &
7935 1.807124155057943e-03, 4.096869282759165e-03, &
7936 6.758290051847379e-03, 9.549957672201647e-03, &
7937 1.232944765224485e-02, 1.501044734638895e-02, &
7938 1.754896798624319e-02, 1.993803778644089e-02, &
7939 2.219493596101229e-02, 2.433914712600081e-02, &
7940 2.637450541483921e-02, 2.828691078877120e-02, &
7941 3.005258112809270e-02, 3.164675137143993e-02, &
7942 3.305041341997850e-02, 3.425509970422606e-02, &
7943 3.526241266015668e-02, 3.607698962288870e-02, &
7944 3.669860449845609e-02, 3.712054926983258e-02, &
7945 3.733422875193504e-02, 3.736107376267902e-02/
7953 if ( epsabs < 0.0e+00 .and. epsrel < 0.0e+00 )
then 7958 hlgth = 5.0e-01*(b-a)
7960 centr = 5.0e-01*(b+a)
7972 res21 = w21b(6) * fcentr
7973 resabs = w21b(6) * abs(fcentr)
7977 fval1 = f(centr+absc)
7978 fval2 = f(centr-absc)
7980 res10 = res10+w10(k)*fval
7981 res21 = res21+w21a(k)*fval
7982 resabs = resabs+w21a(k)*(abs(fval1)+abs(fval2))
7993 fval1 = f(centr+absc)
7994 fval2 = f(centr-absc)
7995 fval = fval1 + fval2
7996 res21 = res21 + w21b(k) * fval
7997 resabs = resabs + w21b(k) * (abs(fval1)+abs(fval2))
8005 result = res21*hlgth
8006 resabs = resabs*dhlgth
8007 reskh = 5.0e-01*res21
8008 resasc = w21b(6)*abs(fcentr-reskh)
8011 resasc = resasc+w21a(k)*(abs(fv1(k)-reskh)+abs(fv2(k)-reskh)) &
8012 +w21b(k)*(abs(fv3(k)-reskh)+abs(fv4(k)-reskh))
8015 abserr = abs((res21-res10)*hlgth)
8016 resasc = resasc*dhlgth
8020 else if ( l == 2 )
then 8022 res43 = w43b(12)*fcentr
8026 res43 = res43+savfun(k) * w43a(k)
8032 fval = f(absc+centr)+f(centr-absc)
8033 res43 = res43+fval*w43b(k)
8039 result = res43 * hlgth
8040 abserr = abs((res43-res21)*hlgth)
8044 else if ( l == 3 )
then 8046 res87 = w87b(23) * fcentr
8050 res87 = res87 + savfun(k) * w87a(k)
8054 absc = hlgth * x4(k)
8055 res87 = res87+w87b(k)*(f(absc+centr)+f(centr-absc))
8058 result = res87 * hlgth
8059 abserr = abs( ( res87-res43) * hlgth )
8063 if ( resasc /= 0.0e+00.and.abserr /= 0.0e+00 )
then 8064 abserr = resasc * min( 1.0e+00,(2.0e+02*abserr/resasc)**1.5e+00)
8067 if ( resabs > tiny( resabs ) / ( 5.0e+01 * epsilon( resabs ) ) )
then 8068 abserr = max(( epsilon( resabs ) *5.0e+01) * resabs, abserr )
8071 if ( abserr <= max( epsabs, epsrel*abs(result)))
then 8075 if ( ier == 0 )
then 8083 subroutine qsort ( limit, last, maxerr, ermax, elist, iord, nrmax )
8133 real(dp) elist(last)
8151 if ( last <= 2 )
then 8162 errmax = elist(maxerr)
8166 isucc = iord(nrmax-1)
8168 if ( errmax <= elist(isucc) )
then 8183 if ( last > (limit/2+2) )
then 8184 jupbn = limit+3-last
8187 errmin = elist(last)
8197 if ( errmax >= elist(isucc) )
go to 60
8214 if ( errmin < elist(isucc) )
go to 80
8230 maxerr = iord(nrmax)
8231 ermax = elist(maxerr)
8235 function qwgtc ( x, c, p2, p3, p4, kp )
8274 qwgtc = 1.0e+00 / ( x - c )
8278 function qwgto ( x, omega, p2, p3, p4, integr )
8315 if ( integr == 1 )
then 8316 qwgto = cos( omega * x )
8317 else if ( integr == 2 )
then 8318 qwgto = sin( omega * x )
8323 function qwgts ( x, a, b, alfa, beta, integr )
8362 if ( integr == 1 )
then 8363 qwgts = ( x - a )**alfa * ( b - x )**beta
8364 else if ( integr == 2 )
then 8365 qwgts = ( x - a )**alfa * ( b - x )**beta * log( x - a )
8366 else if ( integr == 3 )
then 8367 qwgts = ( x - a )**alfa * ( b - x )**beta * log( b - x )
8368 else if ( integr == 4 )
then 8369 qwgts = ( x - a )**alfa * ( b - x )**beta * log( x - a ) * log( b - x )
8374 subroutine r_swap ( x, y )
8406 subroutine timestamp ( )
8431 character ( len = 8 ) ampm
8433 character ( len = 8 ) date
8437 character ( len = 9 ),
parameter,
dimension(12) :: month = (/ &
8438 'January ',
'February ',
'March ',
'April ', &
8439 'May ',
'June ',
'July ',
'August ', &
8440 'September',
'October ',
'November ',
'December ' /)
8443 character ( len = 10 ) time
8446 character ( len = 5 ) zone
8448 call date_and_time ( date, time, zone, values )
8460 else if ( h == 12 )
then 8461 if ( n == 0 .and. s == 0 )
then 8470 else if ( h == 12 )
then 8471 if ( n == 0 .and. s == 0 )
then 8479 write ( *,
'(a,1x,i2,1x,i4,2x,i2,a1,i2.2,a1,i2.2,a1,i3.3,1x,a)' ) &
8480 trim( month(m) ), d, y, h,
':', n,
':', s,
'.', mm, trim( ampm )