Sums Output:
S_up = S_down = 14.39273 (single precision)
S_up = S_down = 14.3927267228657 (double precision)
The apparent lack of difference between S_up and S_down is due to FORTRAN 90's urge to turn backward loops around. The backward loop should be less precise because large numbers are added to small numbers which results in inaccuracy on the last digits.
DUMBINT Output: The value of the integral is 3.041675. Dividing into 259 intervals gives a relative error of 9.97E-05, just below the limit (1E-04). The external function is then called 2072 times.
Note 3
ADAPT Output: To obtain the same value of the integral as DUMBINT (J=3.041675) with the required absolute accuracy (0.0001), we need a relative accuracy of 0.00020. Using these accuracies, the external function is called 288 times - a little more than a tenth the number of calls used by DUMBINT.