Author(s): F. James | Library: MATHLIB |
Submitter: | Submitted: 01.12.1994 |
Language: Fortran | Revised: |
Subroutine subprograms RADAPT and DADAPT calculate, to an attempted specified accuracy, the value of the integral
by adaptive subdivision of the interval (a,b), calculating the integrals over the subintervals using RGS56P and DGS56P (D106).
On CDC and Cray computers, the double-precision version DADAPT is not available.
Structure:
SUBROUTINE subprograms
User Entry Names: RADAPT, DADAPT
External References: RGS56P, DGS56P,
user-supplied FUNCTION subprogram.
Usage:
For (type REAL), (type DOUBLE PRECISION),
CALL tADAPT(F,A,B,NSEG,RELTOL,ABSTOL,RES,ERR)
Method:
The automatic adaption is done as follows: At each step, the total integral is estimated as the sum of the integrals over the subdivisions, and the squared uncertainty is estimated as the sum of the squares of the uncertainties over all subdivisions. If this uncertainty is too big (failing both the absolute and relative tolerance criteria) then the subinterval with the largest absolute uncertainty is divided in half.
Accuracy:
The true accuracy is usually very close to the uncertainty returned
by the subroutine, sometimes it is much better, but very seldom
worse. Even on functions with (integrable) singularities, the results
are usually reliable, as long as the singularity is ``wide enough''
to be detected in the early stages, which can be controlled by the
value of NSEG.