[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Waldhäuser Str. 64, D-72076 Tübingen, Germany
[Uni logo]


TRAPZD Source code in trapzd.pro

TRAPZD

Name
       TRAPZD
Purpose
       Compute the nth stage of refinement of an extended trapezoidal rule.
Explanation
       This procedure is called by QSIMP and QTRAP.   Algorithm from Numerical
       Recipes, Section 4.2.   TRAPZD is meant to be called iteratively from
       a higher level procedure.
Calling Sequence
       TRAPZD, func, A, B, S, step, [ _EXTRA = ]
Input Parameters
       func - scalar string giving name of function to be integrated.   This
               must be a function of one variable.
       A,B -  scalars giving the limits of the integration
Parameters
       S -    scalar giving the total sum from the previous iterations on
               input and the refined sum after the current iteration on output.
       step - LONG scalar giving the number of points at which to compute the
               function for the current iteration.   If step is not defined on
               input, then S is intialized using the average of the endpoints
               of limits of integration.
Optional Input Keywords
       Any supplied keywords will be passed to the user function via the
       _EXTRA facility.
Note
       (1) TRAPZD will check for math errors when computing the function at the
       endpoints, but not on subsequent iterations.
       (2) TRAPZD always uses double precision to sum the function values
       but the call to the user-supplied function is double precision only if
       one of the limits A or B is double precision.
Revision History
       Written         W. Landsman                 August, 1991
       Always use double precision for TOTAL       March, 1996
       Converted to IDL V5.0   W. Landsman   September 1997
       Pass keyword to function via _EXTRA facility  W. Landsman July 1999

Last modified by pro2html on 2001 April 26 at 03:13 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically