Numerical Computing with Modern Fortran

Richard J. Hanson and Tim Hopkins

Chapter 3: Generic Subprograms

Source Code:

  1. in zip format
  2. in gzipped tar format

These executable routines illustrate general packaging of real and complex- valued Airy functions. Use is made of Calgo838 algorithm for the basic source code.

Three executables may be generated using the makefile provided

Sample output from testairy and testairyInc

Airy ODE Wronskian - absolute units of relative error
Computed with NVALS random (0,1) values, using NVALS =   1000
Complex values are in the unit square, (0,1) x (0,1).

Single Precision:              0.56
Double Precision:              1.43
COMPLEX Single Precision:      1.36
COMPLEX Double Precision:      3.31

Sample output from testGeneric

Single precision argument:   0.314159E+01
Ai and Bi values         :   0.508935E-02 -0.938907E-02  0.177473E+02  0.298032E+02
Double precision argument:   0.314159E+01
Ai and Bi values         :   0.508935E-02 -0.938907E-02  0.177473E+02  0.298032E+02
Maximum relative difference;   0.343410E-06

Complex single precision argument:   0.314159E+01  0.100000E+01
Ai values (complex)              :  -0.160031E-02 -0.557314E-02  0.153076E-02  0.107900E-01
Complex double precision argument:   0.314159E+01  0.100000E+01
Ai values (complex)              :  -0.160031E-02 -0.557314E-02  0.153077E-02  0.107900E-01
Maximum relative difference;   0.425063E-06
Donate · Contact Us · Site Map · Join SIAM · My Account
Facebook Twitter Youtube linkedin google+