IBM Books

Engineering and Scientific Subroutine Library for AIX Version 3 Release 3: Guide and Reference


Programming Considerations for the SUBF Subroutine

This section describes how to design and code the subf subroutine for use by the numerical quadrature subrutines.

Designing SUBF

For the Gaussian quadrature subroutines, you must supply a separate subroutine that is callable by ESSL. You specify the name of the subroutine in the subf argument. This subroutine name is selected by you. You should design the subf subroutine so it receives, as input, a tabulated set of points at which the integrand is evaluated, and it returns, as output, the values of the integrand evaluated at these points.

Depending on the numerical quadrature subroutine that you use, the subf subroutine is defined in one of the two following ways:

Coding and Setting Up SUBF in Your Program

Examples of coding a subf subroutine in Fortran are provided for each subroutine in this chapter. Examples of coding a subf subroutine in C, C++, and PL/I are provided in Example 1.

Depending on the programming language you use for your program that calls the numerical quadrature subroutines, you have a choice of one or more languages that you can use for writing subf. These rules and other langauge-related coding rules for setting up subf in your program are described in the following sections:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]