qextr Subroutine

public subroutine qextr(n, epstab, result, abserr, res3la, nres)

QEXTR carries out the Epsilon extrapolation algorithm.

Discussion:

The routine determines the limit of a given sequence of approximations, by means of the epsilon algorithm of P. Wynn. An estimate of the absolute error is also given. The condensed epsilon table is computed. Only those elements needed for the computation of the next diagonal are preserved.

Author:

Robert Piessens, Elise de Doncker-Kapenger, Christian Ueberhuber, David Kahaner

Reference:

Robert Piessens, Elise de Doncker-Kapenger, Christian Ueberhuber, David Kahaner, QUADPACK, a Subroutine Package for Automatic Integration, Springer Verlag, 1983

Parameters:

Input, integer N, indicates the entry of EPSTAB which contains the new element in the first column of the epsilon table.

Input/output, real EPSTAB(52), the two lower diagonals of the triangular epsilon table. The elements are numbered starting at the right-hand corner of the triangle.

Output, real RESULT, the estimated value of the integral.

Output, real ABSERR, estimate of the absolute error computed from RESULT and the 3 previous results.

?, real RES3LA(3), the last 3 results.

Input/output, integer NRES, the number of calls to the routine. This should be zero on the first call, and is automatically updated before return.

Local Parameters:

      e0     - the 4 elements on which the
      e1       computation of a new element in
      e2       the epsilon table is based
      e3                 e0
                   e3    e1    new
                         e2
      newelm - number of elements to be computed in the new
               diagonal
      error  - error = abs(e1-e0)+abs(e2-e1)+abs(new-e2)
      result - the element in the new diagonal with least value
               of error
      limexp is the maximum number of elements the epsilon table
      can contain. if this number is reached, the upper diagonal
      of the epsilon table is deleted.

Arguments

Type IntentOptional Attributes Name
integer :: n
real :: epstab(52)
real :: result
real :: abserr
real :: res3la(3)
integer :: nres

Contents