@@ -552,8 +552,8 @@ dqagie(double(*fcn)(double* x), const double bound, const int inf,
552
552
// The smallest interval has the largest error. Before bisecting
553
553
// decrease the sum of the errors over the larger intervals (erlarg)
554
554
// and perform extrapolation.
555
- jupbnd = (* last > 2 + (limit /2 ) ? limit + 2 - L : L );
556
- for (k = nrmax ; k <= jupbnd ; k ++ ) {
555
+ jupbnd = (* last > 2 + (limit /2 ) ? limit + 3 - * last : * last );
556
+ for (k = nrmax ; k < jupbnd ; k ++ ) {
557
557
maxerr = iord [nrmax ];
558
558
errmax = elist [maxerr ];
559
559
if (fabs (blist [maxerr ] - alist [maxerr ]) > small ) { goto LINE90 ; }
@@ -1104,8 +1104,8 @@ dqagpe(double(*fcn)(double* x), const double a, const double b, int npts2,
1104
1104
// The smallest interval has the largest error. Before bisecting
1105
1105
// decrease the sum of the errors over the larger intervals (erlarg)
1106
1106
// and perform extrapolation.
1107
- jupbnd = (* last > 2 + (limit /2 ) ? limit + 2 - L : L );
1108
- for (k = nrmax ; k <= jupbnd ; k ++ ) {
1107
+ jupbnd = (* last > 2 + (limit /2 ) ? limit + 3 - * last : * last );
1108
+ for (k = nrmax ; k < jupbnd ; k ++ ) {
1109
1109
maxerr = iord [nrmax ];
1110
1110
errmax = elist [maxerr ];
1111
1111
if (level [maxerr ] + 1 <= levmax ) { goto LINE160 ; } // break->continue
@@ -1531,8 +1531,8 @@ dqagse(double(*fcn)(double* x), const double a, const double b,
1531
1531
// The smallest interval has the largest error. Before bisecting
1532
1532
// decrease the sum of the errors over the larger intervals (erlarg)
1533
1533
// and perform extrapolation.
1534
- jupbnd = (* last > 2 + (limit /2 ) ? limit + 2 - L : L );
1535
- for (k = nrmax ; k <= jupbnd ; k ++ ) {
1534
+ jupbnd = (* last > 2 + (limit /2 ) ? limit + 3 - * last : * last );
1535
+ for (k = nrmax ; k < jupbnd ; k ++ ) {
1536
1536
maxerr = iord [nrmax ];
1537
1537
errmax = elist [maxerr ];
1538
1538
if (fabs (blist [maxerr ] - alist [maxerr ]) > small ) { goto LINE90 ; } // break->continue
@@ -2715,9 +2715,9 @@ dqawoe(double(*fcn)(double* x), const double a, const double b, const double ome
2715
2715
// The smallest interval has the largest error. Before bisecting, decrease
2716
2716
// the sum of the erorrs over the larger intervals (erlarg) and perform
2717
2717
// extrapolation.
2718
- jupbnd = (* last > ( limit / 2 + 2 ) ? limit + 2 - * last : L );
2718
+ jupbnd = (* last > 2 + ( limit / 2 ) ? limit + 3 - * last : * last );
2719
2719
2720
- for (k = nrmax ; k <= jupbnd ; k ++ ) {
2720
+ for (k = nrmax ; k < jupbnd ; k ++ ) {
2721
2721
maxerr = iord [nrmax ];
2722
2722
errmax = elist [maxerr ];
2723
2723
if (fabs (blist [maxerr ] - alist [maxerr ]) > small ) { goto LINE140 ; }
0 commit comments