------------------------------------------------------------------------------- 
                            SCRUNCH CONTENT                            03/09/89 
------------------------------------------------------------------------------- 
  
 The following is a list of the subprograms from SCRUNCH.  Subprogram names
 refer to the algorithm given in the book "Computer Methods for Mathematical
 Computations," by G. Forsythe, M. Malcolm, C. Moler, Prentice Hall, 1977.
  
 Name
  
 RKF45
 Runge-Kutta Felberg method for the integration of a first order system of
 ordinary differential equations. This routine has GAMS class I1a1a.
 10000 REM  SUBROUTINE RKF45 INPUT (X0,Y,N0,X1,E0,E1,G1) OUTPUT (X0,Y,E0,E1,G1) 
 10010 REM  LOCAL (K,Q,R,U0,U1,U2,N8,N9,G2,G3,G4,G5,G6,G7,G8,G9,E2,E3,E4,
 10020 REM          E5,E6,E7,E8,E9,T0,T1,T2,T3,T4,T5,T6,T7,T8,T9)
  
 10910 REM THE USER MUST WRITE   SUBROUTINE YPRIME INPUT (E5,Q) OUTPUT (R)
 10920 REM WHICH BEGINS AT STATEMENT NUMBER 5000 AND USES
 10930 REM
 10940 REM           E5       THE INDEPENDENT VARIABLE
 10950 REM           Q        THE DEPENDENT VARIABLE AT E5
 10960 REM
 10970 REM      TO COMPUTE
 10980 REM
 10990 REM           R       THE SYSTEM OF DERIVATIVES
  
  
  
 DECOMP
 Decomposes a matrix using Gaussian elimination into a lower and upper
 triangular factorization and estimates the condition of the matrix.  This
 routine is usually used in conjunction with SOLVE which takes the LU 
 factorization produced by DECOMP to actually solve a system of linear
 equations.  This routine has GAMS class D2a1.
 20000 REM    SUBROUTINE DECOMP INPUT (A,N1) OUTPUT (A,K0,P)
 20010 REM                      LOCAL (B,K1,K2,K3,K4,K5,K6,K7,K8,K9)
 20020 REM
 20030 REM    ALSO     21580 REM SUBROUTINE SOLVE INPUT (A,P,B,N1)
 20040 REM             21590 REM            OUTPUT (B) LOCAL (K1,K3,K4,K8)
  
  
  
 SYMEIG
 Computes the eigenvalues and, optionally the eigenvectors of a real
 symmetric matrix. This routine has GAMS class D4a1.
 22000 REM  SUBROUTINE SYMEIG INPUT (J,N4,I9) OUTPUT (L,E IF I9=1)
 22010 REM                    LOCAL (Z,J0,J1,J2,J3,J4,J5,J6,J7,J8,J9,D8)
  
  
  
 FNM
 Calculates an approximation to the point where a user defined function
 attains a minimum on a given interval. This routine has GAMS class G1a1a.
 30000 REM  SUBROUTINE FNM INPUT (X4,X5,B0) OUTPUT (Z8)
 30010 REM  LOCAL (B1,B2,B3,B4,B5,B6,B7,B8,B9,F0,F1,F2,F3,F4,F5,F6,F7,U0,U4)
  
 30400 REM  THE USER MUST WRITE A SUBROUTINE TO EVALUATE THE FUNCTION 
 30410 REM  WHOSE MINIMUM IS SOUGHT
 30420 REM
 30430 REM  7000 REM    SUBROUTINE FMIN INPUT (Z4) OUTPUT (Z5)
  
  
  
 ZEROIN
 Calculates a root of a nonlinear user supplied function given an initial
 interval in which the function changes sign. This routine is in GAMS
 class F1a2.
 32000 REM   SUBROUTINE ZEROIN INPUT (V1,V2,C1,C2) OUTPUT (V1,C0)
 32010 REM   LOCAL (C3,C4,C5,C6,C7,C8,C9,V0,V3,V4,V5,V6,V7,V8,V9)
  
 32200 REM   THE USER MUST WRITE A SUBROUTINE TO EVALUATE THE FUNCTION
 32210 REM   WHOSE ROOT IS DESIRED
 32220 REM
 32230 REM    8000 REM SUBROUTINE FROOT INPUT (Z6) OUTPUT (Z7)
  
  
  
 HECOMP
 Performs Householder reduction of a rectangular matrix to upper
 triangular form. Usually used in conjunction with HOLVE to find the least 
 squares solution of an overdetermined linear system. This routine has GAMS
 class D9a1.
 40000 REM  SUBROUTINE HECOMP INPUT (C,M2,N2) OUTPUT (C,D,D0)
 40010 REM                    LOCAL (D1,D2,D3,D4,D5,D6)
  
  
  
 SVD
 Calculates the singular value decomposition (SVD) of a given rectangular
 matrix. This routine has GAMS class D6.
 42000 REM SUBROUTINE SVD INPUT(S,M3,N3,I0,I1) OUTPUT(W,I2,U IF I0=1,V IF I1=1) 
 42010 REM  LOCAL (T,I3,I4,I5,I6,I7,I8,H0,H1,H2,H3,H4,H5,H6,H7,H8,H9) 
  
  
  
 SIMP
 Calculates an estimate of the definite integral of a user supplied function 
 by adaptive quadrature. This routine has GAMS class H2a1a1.
 50000 REM  SUBROUTINE SIMP INPUT (X2,X3,A0) OUTPUT (Y0,Y1,A1,A2)
 50010 REM  LOCAL (H,I,U0,U3,A3,A4,A5,A6,A7,A8,A9,Y2,Y3,Y4,Y5,Y6,Y7,Y8,Y9)
  
 50220 REM  USER MUST WRITE A SUBROUTINE TO EVALUATE THE INTEGRAND Z1 = Y(Z0)
 50230 REM
 50240 REM     6000 REM  SUBROUTINE INTEGRAND INPUT (Z0) OUTPUT (Z1)
  
  
  
 SPLINE
 Calculates the coefficients of a spline interpolant to given data. Usually
 used in conjunction with SEVAL to subsequently evaluate the spline at
 arbitrary points. This routine is in GAMS class E1a.
 60000 REM  SUBROUTINE SPLINE INPUT (X,F,N5) OUTPUT (G(*,1),G(*,2),G(*,3))
 60010 REM  LOCAL (L0)
  
  
 RKFTEST
       test driver for RKF45
  
  
 DECOMPT
       test driver for DECOMP
  
  
 SYMEIGT
       test driver for SYMEIG
  
  
 ZEROINT
       test driver for ZEROIN
  
  
 HECOMPT
       test driver for HECOMP
  
  
 SVDTEST
       test driver for SVD 
  
  
 SPLINET
       test driver for SPLINE
  
  
 FNMSIMP
       test driver for combined use of FNM and SIMP
  
  
 SHOOT
       test driver for combined use of RKF45 and ZEROIN
  
  
  
 To execute these test drivers inside BASIC, simply LOAD "test driver"
                                                    MERGE "SCRUNCH routine"
                                                    RUN
  
 For the two drivers, FNMSIMP and SHOOT, involving more than one SCRUNCH
 routine, inside BASIC one should
  
               LOAD "SHOOT"                 LOAD "FNMSIMP"
               MERGE "RKF45"                MERGE "FNM"
               MERGE "ZEROIN"               MERGE "SIMP"
               RUN                          RUN
  
