!
!     STATS.FI  - Declare single-precision MS IMSL STAT/LIBRARY routines
!
!     For use with the MS IMSL Libraries for MS FORTRAN PowerStation
!     for DOS and MS IMSL Libraries for MS FORTRAN PowerStation 32
!
!     Copyright (c) 1994 by Visual Numerics, Inc.  All Rights Reserved.
!
!     NOTE:  The following rules are followed to maintain compatibility
!            with fixed-form and free-form source:
!            1. All comments must start with '!'
!            2. All code must be within columns 7-72
!            3. For continuation, a '&' is in column 73 of the line to
!               be continued and in column 6 of the continuation line
!

$IF .NOT. DEFINED (IMSL_STAT_SINGLE)

!
!     Chapter 1:  Basic Statistics
!

      interface to subroutine owfrq (nobs, x, k, iopt, xlo, xhi, clhw,  &
     &           div, table)
      integer    nobs, k, iopt
      real       xlo, xhi, clhw, x(*), div(*), table(*)
      end

      interface to subroutine twfrq (nobs, x, y, kx, ky, iopt, xlo, ylo,&
     &           xhi, yhi, clhwx, clhwy, divx, divy, table, ldtabl)
      integer    nobs, kx, ky, iopt, ldtabl
      real       xlo, ylo, xhi, yhi, clhwx, clhwy, x(*), y(*),          &
     &           divx(*), divy(*), table(ldtabl,*)
      end

      interface to subroutine freq (ido, nobs, ncol, x, ldx, ifrq,      &
     &           nclvar, indcl, maxtab, maxcl, nclval, clval, table)
      integer    ido, nobs, ncol, ldx, ifrq, nclvar, maxtab, maxcl,     &
     &           indcl(*), nclval(*)
      real       x(ldx,*), clval(*), table(*)
      end

      interface to subroutine f2eq (ido, nobs, ncol, x, ldx, ifrq,      &
     &           nclvar, indcl, maxtab, maxcl, nclval, clval, table,    &
     &           indx, vec)
      integer    ido, nobs, ncol, ldx, ifrq, nclvar, maxtab, maxcl,     &
     &           indcl(*), nclval(*), indx(*)
      real       x(ldx,*), clval(*), table(*), vec(*)
      end

      interface to subroutine uvsta (ido, nrow, nvar, x, ldx, ifrq, iwt,&
     &           mopt, conprm, conprv, iprint, stat, ldstat, nrmiss)
      integer    ido, nrow, nvar, ldx, ifrq, iwt, mopt, iprint,         &
     &           ldstat, nrmiss
      real       conprm, conprv, x(ldx,*), stat(ldstat,*)
      end

      interface to subroutine u2sta (ido, nrow, nvar, x, ldx, ifrq, iwt,&
     &           mopt, conprm, conprv, iprint, stat, ldstat, nrmiss, wk)
      integer    ido, nrow, nvar, ldx, ifrq, iwt, mopt, iprint,         &
     &           ldstat, nrmiss
      real       conprm, conprv, x(ldx,*), stat(ldstat,*), wk(*)
      end

      interface to subroutine ranks (nobs, x, fuzz, itie, iscore, score)
      integer    nobs, itie, iscore
      real       fuzz, x(*), score(*)
      end

      interface to subroutine r2nks (nobs, x, fuzz, itie, iscore, score,&
     &           iwk)
      integer    nobs, itie, iscore, iwk(*)
      real       fuzz, x(*), score(*)
      end

      interface to subroutine lettr (nobs, x, num, sumry, nmiss)
      integer    nobs, num, nmiss
      real       x(*), sumry(*)
      end

      interface to subroutine l2ttr (nobs, x, num, sumry, nmiss, wk)
      integer    nobs, num, nmiss
      real       x(*), sumry(*), wk(*)
      end

      interface to subroutine ordst (nobs, x, nos, iopt, ios, os, nmiss)
      integer    nobs, nos, iopt, nmiss, ios(*)
      real       x(*), os(*)
      end

      interface to subroutine o2dst (nobs, x, nos, iopt, ios, os, nmiss,&
     &           wk)
      integer    nobs, nos, iopt, nmiss, ios(*)
      real       x(*), os(*), wk(*)
      end

      interface to subroutine eqtil (nobs, x, nqprop, qprop, q, xlo,    &
     &           xhi, nmiss)
      integer    nobs, nqprop, nmiss
      real       x(*), qprop(*), q(*), xlo(*), xhi(*)
      end

      interface to subroutine e2til (nobs, x, nqprop, qprop, q, xlo,    &
     &           xhi, nmiss, wk)
      integer    nobs, nqprop, nmiss
      real       x(*), qprop(*), q(*), xlo(*), xhi(*), wk(*)
      end

      interface to subroutine twomv (ido, nrowx, x, nrowy, y, conprm,   &
     &           conprv, iprint, stat)
      integer    ido, nrowx, nrowy, iprint
      real       conprm, conprv, x(*), y(*), stat(*)
      end

      interface to subroutine bines (n, k, conper, phat, plower, pupper)
      integer    n, k
      real       conper, phat, plower, pupper
      end

      interface to subroutine poies (nobs, ix, conper, that, tlower,    &
     &           tupper)
      integer    nobs, ix(*)
      real       conper, that, tlower, tupper
      end

      interface to subroutine nrces (nobs, xrt, xlt, icen, epsm, epssig,&
     &           maxits, init, xmean, xsigma, vxm, vxs, covxms, number)
      integer    nobs, maxits, init, icen(*), number(*)
      real       epsm, epssig, xmean, xsigma, vxm, vxs, covxms,         &
     &           xrt(*), xlt(*)
      end

      interface to subroutine grpes (ngroup, table, clow, cwidth,       &
     &           iprint, stat)
      integer    ngroup, iprint
      real       clow, cwidth, table(*), stat(*)
      end

      interface to subroutine cstat (ido, nrow, ncol, x, ldx, nr, irx,  &
     &           ifrq, iwt, mopt, kmax, k, celif, ldceli)
      integer    ido, nrow, ncol, ldx, nr, ifrq, iwt, mopt, kmax, k,    &
     &           ldceli, irx(*)
      real       x(ldx,*), celif(ldceli,*)
      end

      interface to subroutine medpl (nrow, ncol, table, ldtabl, maxit,  &
     &           ptable, ldptab, iter)
      integer    nrow, ncol, ldtabl, maxit, ldptab, iter
      real       table(ldtabl,*), ptable(ldptab,*)
      end

      interface to subroutine m2dpl (nrow, ncol, table, ldtabl, maxit,  &
     &           ptable, ldptab, iter, wk)
      integer    nrow, ncol, ldtabl, maxit, ldptab, iter
      real       table(ldtabl,*), ptable(ldptab,*), wk(*)
      end

!
!     Chapter 2:  Regression
!

      interface to subroutine rone (nobs, ncol, x, ldx, intcep, irsp,   &
     &           ind, ifrq, iwt, ipred, conpcm, conpcp, iprint, aov,    &
     &           coef, ldcoef, covb, ldcovb, testlf, case, ldcase,      &
     &           nrmiss)
      integer    nobs, ncol, ldx, intcep, irsp, ind, ifrq, iwt, ipred,  &
     &           iprint, ldcoef, ldcovb, ldcase, nrmiss
      real       conpcm, conpcp, x(*), aov(*), coef(*), covb(*),        &
     &           testlf(*), case(*)
      end

      interface to subroutine r2ne (nobs, ncol, x, ldx, intcep, irsp,   &
     &           ind, ifrq, iwt, ipred, conpcm, conpcp, iprint, aov,    &
     &           coef, ldcoef, covb, ldcovb, testlf, case, ldcase,      &
     &           nrmiss, iwk, wk)
      integer    nobs, ncol, ldx, intcep, irsp, ind, ifrq, iwt, ipred,  &
     &           iprint, ldcoef, ldcovb, ldcase, nrmiss, iwk(*)
      real       conpcm, conpcp, x(ldx,*), aov(*), coef(ldcoef,*),      &
     &           covb(ldcovb,*), testlf(10), case(ldcase,*), wk(*)
      end

      interface to subroutine rincf (sumwtf, dfe, intcep, b, xymean,    &
     &           ssx, s2, swtfy0, conper, ylower, yupper, xlower,       &
     &           xupper)
      integer    intcep
      real       sumwtf, dfe, ssx, s2, swtfy0, conper, ylower, yupper,  &
     &           xlower, xupper, b(*), xymean(2)
      end

      interface to subroutine rinpf (sumwtf, dfs2, intcep, b, xymean,   &
     &           ssx, s2, conper, iy0, swtfy0, y0, x0hat, xlower,       &
     &           xupper)
      integer    intcep, iy0
      real       sumwtf, dfs2, ssx, s2, conper, swtfy0, y0, x0hat,      &
     &           xlower, xupper, b(*), xymean(2)
      end

      interface to subroutine rlse (nobs, y, nind, x, ldx, intcep, b,   &
     &           sst, sse)
      integer    nobs, nind, ldx, intcep
      real       sst, sse, y(*), x(*), b(*)
      end

      interface to subroutine r2se (nobs, y, nind, x, ldx, intcep, b,   &
     &           sst, sse, r, ldr, dfe, nrmiss, wk)
      integer    nobs, nind, ldx, intcep, ldr, nrmiss
      real       sst, sse, dfe, y(*), x(*), b(*), r(*), wk(*)
      end

      interface to subroutine rcov (intcep, nind, ndep, cov, ldcov,     &
     &           xymean, sumwtf, tol, b, ldb, r, ldr, irank, scpe,      &
     &           ldscpe)
      integer    intcep, nind, ndep, ldcov, ldb, ldr, irank, ldscpe
      real       sumwtf, tol, cov(ldcov,*), xymean(*), b(ldb,*),        &
     &           r(ldr,*), scpe(ldscpe,*)
      end

      interface to subroutine rgivn (ido, nrow, ncol, x, ldx, intcep,   &
     &           iind, indind, idep, inddep, ifrq, iwt, isub, tol, b,   &
     &           ldb, r, ldr, d, irank, dfe, scpe, ldscpe, nrmiss, xmin,&
     &           xmax)
      integer    ido, nrow, ncol, ldx, intcep, iind, idep, ifrq, iwt,   &
     &           isub, ldb, ldr, irank, ldscpe, nrmiss, indind(*),      &
     &           inddep(*)
      real       tol, dfe, x(ldx,*), b(ldb,*), r(ldr,*), d(*),          &
     &           scpe(ldscpe,*), xmin(*), xmax(*)
      end

      interface to subroutine r2ivn (ido, nrow, nvar, x, ldx, intcep,   &
     &           iind, indind, idep, inddep, ifrq, iwt, isub, tol, b,   &
     &           ldb, r, ldr, d, irank, dfe, scpe, ldscpe, nrmiss, xmin,&
     &           xmax, wk)
      integer    ido, nrow, nvar, ldx, intcep, iind, idep, ifrq, iwt,   &
     &           isub, ldb, ldr, irank, ldscpe, nrmiss, indind(*),      &
     &           inddep(*)
      real       tol, dfe, x(*), b(ldb,*), r(ldr,*), d(*),              &
     &           scpe(ldscpe,*), xmin(*), xmax(*), wk(*)
      end

      interface to subroutine rglm (ido, nrow, ncol, x, ldx, intcep,    &
     &           nclvar, indcl, nef, nvef, indef, idep, inddep, ifrq,   &
     &           iwt, idummy, isub, tol, maxcl, nclval, clval, irbef, b,&
     &           ldb, r, ldr, d, irank, dfe, scpe, ldscpe, nrmiss, xmin,&
     &           xmax)
      integer    ido, nrow, ncol, ldx, intcep, nclvar, nef, idep,       &
     &           ifrq, iwt, idummy, isub, maxcl, ldb, ldr, irank,       &
     &           ldscpe, nrmiss, indcl(*), nvef(*), indef(*),           &
     &           inddep(*), nclval(*), irbef(*)
      real       tol, dfe, x(*), clval(*), b(*), r(*), d(*), scpe(*),   &
     &           xmin(*), xmax(*)
      end

      interface to subroutine r2lm (ido, nrow, ncol, x, ldx, intcep,    &
     &           nclvar, indcl, nef, nvef, indef, idep, inddep, ifrq,   &
     &           iwt, idummy, isub, tol, maxcl, nclval, clval, irbef, b,&
     &           ldb, r, ldr, d, irank, dfe, scpe, ldscpe, nrmiss, xmin,&
     &           xmax, iwk, wk)
      integer    ido, nrow, ncol, ldx, intcep, nclvar, nef, idep,       &
     &           ifrq, iwt, idummy, isub, maxcl, ldb, ldr, irank,       &
     &           ldscpe, nrmiss, indcl(*), nvef(*), indef(*),           &
     &           inddep(*), nclval(*), irbef(*), iwk(*)
      real       tol, dfe, x(ldx,*), clval(*), b(ldb,*), r(ldr,*),      &
     &           d(*), scpe(ldscpe,*), xmin(*), xmax(*), wk(*)
      end

      interface to subroutine rlequ (invoke, nh, ncoef, h, ldh, ig,     &
     &           ndep, g, ldg, tol, b, ldb, r, ldr, d, irankr, dfe,     &
     &           scpe, ldscpe, irankh)
      integer    invoke, nh, ncoef, ldh, ig, ndep, ldg, ldb, ldr,       &
     &           irankr, ldscpe, irankh
      real       tol, dfe, h(*), g(*), b(*), r(*), d(*), scpe(*)
      end

      interface to subroutine r2equ (invoke, nh, ncoef, h, ldh, ig,     &
     &           ndep, g, ldg, tol, b, ldb, r, ldr, d, irankr, dfe,     &
     &           scpe, ldscpe, irankh, wk)
      integer    invoke, nh, ncoef, ldh, ig, ndep, ldg, ldb, ldr,       &
     &           irankr, ldscpe, irankh
      real       tol, dfe, h(ldh,*), g(ldg,*), b(ldb,*), r(ldr,*),      &
     &           d(*), scpe(ldscpe,*), wk(*)
      end

      interface to subroutine rstat (intcep, ief, irbef, b, r, ldr, dfe,&
     &           sse, print, aov, sqss, ldsqss, coef, ldcoef, covb,     &
     &           ldcovb)
      integer    intcep, ief, ldr, ldsqss, ldcoef, ldcovb, irbef(*)
      real       dfe, sse, b(*), r(ldr,*), aov(*), sqss(ldsqss,*),      &
     &           coef(ldcoef,*), covb(ldcovb,*)
      character  print*(*)
      end

      interface to subroutine rcovb (ncoef, r, ldr, s2, covb, ldcovb)
      integer    ncoef, ldr, ldcovb
      real       s2, r(ldr,*), covb(ldcovb,*)
      end

      interface to subroutine cesti (nhp, ncoef, hp, ldhp, ndep, nu, gp,&
     &           ldgp, r, ldr, irankp, nh, h, ldh, g, ldg)
      integer    nhp, ncoef, ldhp, ndep, nu, ldgp, ldr, irankp, nh,     &
     &           ldh, ldg
      real       hp(*), gp(*), r(*), h(*), g(*)
      end

      interface to subroutine c2sti (nhp, ncoef, hp, ldhp, ndep, nu, gp,&
     &           ldgp, r, ldr, irankp, nh, h, ldh, g, ldg, iwk, wk)
      integer    nhp, ncoef, ldhp, ndep, nu, ldgp, ldr, irankp, nh,     &
     &           ldh, ldg, iwk(*)
      real       hp(*), gp(*), r(*), h(*), g(*), wk(*)
      end

      interface to subroutine rhpss (nh, ncoef, h, ldh, ndep, b, ldb,   &
     &           nu, u, ldu, g, ldg, r, ldr, dfh, scph, ldscph)
      integer    nh, ncoef, ldh, ndep, ldb, nu, ldu, ldg, ldr, ldscph
      real       dfh, h(*), b(*), u(*), g(*), r(*), scph(*)
      end

      interface to subroutine r2pss (nh, ncoef, h, ldh, ndep, b, ldb,   &
     &           nu, u, ldu, g, ldg, r, ldr, dfh, scph, ldscph, iwk, wk)
      integer    nh, ncoef, ldh, ndep, ldb, nu, ldu, ldg, ldr, ldscph,  &
     &           iwk(*)
      real       dfh, h(*), b(*), u(*), g(*), r(*), scph(*), wk(*)
      end

      interface to subroutine rhpte (dfe, ndep, scpe, ldscpe, nu, u,    &
     &           ldu, dfh, scph, ldscph, test)
      integer    ndep, ldscpe, nu, ldu, ldscph
      real       dfe, dfh, scpe(*), u(*), scph(*), test(*)
      end

      interface to subroutine r2pte (dfe, ndep, scpe, ldscpe, nu, u,    &
     &           ldu, dfh, scph, ldscph, test, wk)
      integer    ndep, ldscpe, nu, ldu, ldscph
      real       dfe, dfh, scpe(*), u(*), scph(*), test(*), wk(*)
      end

      interface to subroutine rlofe (nobs, ncol, x, ldx, irep, indrep,  &
     &           irsp, ifrq, iwt, dfe, sse, igroup, ngroup, testlf)
      integer    nobs, ncol, ldx, irep, irsp, ifrq, iwt, ngroup,        &
     &           indrep(*), igroup(*)
      real       dfe, sse, x(*), testlf(10)
      end

      interface to subroutine r2ofe (nobs, ncol, x, ldx, irep, indrep,  &
     &           irsp, ifrq, iwt, dfe, sse, igroup, ngroup, testlf, iwk,&
     &           wk)
      integer    nobs, ncol, ldx, irep, irsp, ifrq, iwt, ngroup,        &
     &           indrep(*), igroup(*), iwk(*)
      real       dfe, sse, x(*), testlf(10), wk(*)
      end

      interface to subroutine rlofn (nobs, ncol, x, ldx, intcep, iind,  &
     &           indind, irsp, ifrq, iwt, b, r, ldr, dfe, sse, iclust,  &
     &           maxit, tol, ngroup, igroup, testlf)
      integer    nobs, ncol, ldx, intcep, iind, irsp, ifrq, iwt, ldr,   &
     &           iclust, maxit, ngroup, indind(*), igroup(*)
      real       dfe, sse, tol, x(*), b(*), r(*), testlf(10)
      end

      interface to subroutine r2ofn (nobs, ncol, x, ldx, intcep, iind,  &
     &           indind, irsp, ifrq, iwt, b, r, ldr, dfe, sse, iclust,  &
     &           maxit, tol, ngroup, igroup, testlf, iwk, wk)
      integer    nobs, ncol, ldx, intcep, iind, irsp, ifrq, iwt, ldr,   &
     &           iclust, maxit, ngroup, indind(*), igroup(*), iwk(*)
      real       dfe, sse, tol, x(*), b(*), r(*), testlf(10), wk(*)
      end

      interface to subroutine rcase (ido, nrx, ncol, x, ldx, intcep,    &
     &           ief, nclvar, indcl, nclval, clval, nvef, indef, idummy,&
     &           irsp, iwt, ipred, conpcm, conpcp, print, iobs, ncoef,  &
     &           b, r, ldr, dfe, sse, case, ldcase, nrmiss)
      integer    ido, nrx, ncol, ldx, intcep, ief, nclvar, idummy,      &
     &           irsp, iwt, ipred, iobs, ncoef, ldr, ldcase, nrmiss,    &
     &           indcl(*), nclval(*), nvef(*), indef(*)
      real       conpcm, conpcp, dfe, sse, x(*), clval(*), b(*), r(*),  &
     &           case(*)
      character  print*(*)
      end

      interface to subroutine r2ase (ido, nrx, ncol, x, ldx, intcep,    &
     &           ief, nclvar, indcl, nclval, clval, nvef, indef, idummy,&
     &           irsp, iwt, ipred, conpcm, conpcp, print, iobs, ncoef,  &
     &           b, r, ldr, dfe, sse, case, ldcase, nrmiss, wk)
      integer    ido, nrx, ncol, ldx, intcep, ief, nclvar, idummy,      &
     &           irsp, iwt, ipred, iobs, ncoef, ldr, ldcase, nrmiss,    &
     &           indcl(*), nclval(*), nvef(*), indef(*)
      real       conpcm, conpcp, dfe, sse, x(ldx,*), clval(*), b(*),    &
     &           r(ldr,*), case(ldcase,12), wk(*)
      character  print*(*)
      end

      interface to subroutine rotin (nrx, ncol, x, ldx, intcep, iind,   &
     &           indind, iwt, r, ldr, dfe, sse, e, otin, ldotin, nrmiss)
      integer    nrx, ncol, ldx, intcep, iind, iwt, ldr, ldotin,        &
     &           nrmiss, indind(*)
      real       dfe, sse, x(*), r(*), e(*), otin(*)
      end

      interface to subroutine r2tin (nrx, ncol, x, ldx, intcep, iind,   &
     &           indind, iwt, r, ldr, dfe, sse, e, otin, ldotin, nrmiss,&
     &           wk)
      integer    nrx, ncol, ldx, intcep, iind, iwt, ldr, ldotin,        &
     &           nrmiss, indind(*)
      real       dfe, sse, x(ldx,*), r(ldr,*), e(*), otin(ldotin,*),    &
     &           wk(*)
      end

      interface to subroutine gclas (ido, nrow, ncol, x, ldx, nclvar,   &
     &           indcl, maxcl, nclval, clval, nmiss)
      integer    ido, nrow, ncol, ldx, nclvar, maxcl, indcl(*),         &
     &           nclval(*), nmiss(*)
      real       x(ldx,*), clval(*)
      end

      interface to subroutine grglm (nrow, ncol, x, ldx, nclvar, indcl, &
     &           nclval, clval, nef, nvef, indef, idummy, nreg, reg,    &
     &           ldreg, nrmiss)
      integer    nrow, ncol, ldx, nclvar, nef, idummy, nreg, ldreg,     &
     &           nrmiss, indcl(*), nclval(*), nvef(*), indef(*)
      real       x(*), clval(*), reg(ldreg,*)
      end

      interface to subroutine rbest (nvar, cov, ldcov, nobs, icrit,     &
     &           nbest, ngood, iprint, icritx, crit, ivarx, indvar,     &
     &           icoefx, coef, ldcoef)
      integer    nvar, ldcov, nobs, icrit, nbest, ngood, iprint,        &
     &           ldcoef, icritx(*), ivarx(*), indvar(*), icoefx(*)
      real       cov(*), crit(*), coef(*)
      end

      interface to subroutine r2est (nvar, cov, ldcov, nobs, icrit,     &
     &           nbest, ngood, iprint, icritx, crit, ivarx, indvar,     &
     &           icoefx, coef, ldcoef, wk, iwk)
      integer    nvar, ldcov, nobs, icrit, nbest, ngood, iprint,        &
     &           ldcoef, icritx(*), ivarx(*), indvar(*), icoefx(*),     &
     &           iwk(*)
      real       cov(*), crit(*), coef(*), wk(*)
      end

      interface to subroutine rstep (invoke, nvar, cov, ldcov, level,   &
     &           nforce, nstep, istep, nobs, pin, pout, tol, iprint,    &
     &           scale, hist, iend, aov, coef, ldcoef, covb, ldcovb)
      integer    invoke, nvar, ldcov, nforce, nstep, istep, nobs,       &
     &           iprint, iend, ldcoef, ldcovb, level(*)
      real       pin, pout, tol, cov(ldcov,*), scale(*), hist(*),       &
     &           aov(*), coef(ldcoef,*), covb(ldcovb,*)
      end

      interface to subroutine r2tep (invoke, nvar, cov, ldcov, level,   &
     &           nforce, nstep, istep, nobs, pin, pout, tol, iprint,    &
     &           scale, hist, iend, aov, coef, ldcoef, covb, ldcovb, wk,&
     &           iwk)
      integer    invoke, nvar, ldcov, nforce, nstep, istep, nobs,       &
     &           iprint, iend, ldcoef, ldcovb, level(*), iwk(*)
      real       pin, pout, tol, cov(ldcov,*), scale(*), hist(*),       &
     &           aov(*), coef(ldcoef,*), covb(ldcovb,*), wk(*)
      end

      interface to subroutine gswep (krow, n, a, lda, irev, tol, scale, &
     &           swept)
      integer    krow, n, lda, irev
      real       tol, a(lda,*), scale(*), swept(*)
      end

      interface to subroutine rsubm (na, a, lda, swept, nasub, asub,    &
     &           ldasub)
      integer    na, lda, nasub, ldasub
      real       a(*), swept(*), asub(*)
      end

      interface to subroutine r2ubm (na, a, lda, swept, nasub, asub,    &
     &           ldasub, iwk)
      integer    na, lda, nasub, ldasub, iwk(*)
      real       a(lda,*), swept(*), asub(ldasub,*)
      end

      interface to subroutine rpoly (nobs, ncol, x, ldx, irsp, ind,     &
     &           ifrq, iwt, ipred, conpcm, conpcp, maxdeg, icrit, crit, &
     &           lof, iprint, ndeg, aov, sqss, ldsqss, coef, ldcoef,    &
     &           tlof, ldtlof, case, ldcase, nrmiss)
      integer    nobs, ncol, ldx, irsp, ind, ifrq, iwt, ipred, maxdeg,  &
     &           icrit, lof, iprint, ndeg, ldsqss, ldcoef, ldtlof,      &
     &           ldcase, nrmiss
      real       conpcm, conpcp, crit, x(*), aov(*), sqss(*), coef(*),  &
     &           tlof(*), case(*)
      end

      interface to subroutine r2oly (nobs, ncol, x, ldx, irsp, ind,     &
     &           ifrq, iwt, ipred, conpcm, conpcp, maxdeg, icrit, crit, &
     &           lof, iprint, ndeg, aov, sqss, ldsqss, coef, ldcoef,    &
     &           tlof, ldtlof, case, ldcase, nrmiss, wk, iwk)
      integer    nobs, ncol, ldx, irsp, ind, ifrq, iwt, ipred, maxdeg,  &
     &           icrit, lof, iprint, ndeg, ldsqss, ldcoef, ldtlof,      &
     &           ldcase, nrmiss, iwk(*)
      real       conpcm, conpcp, crit, x(ldx,*), aov(*),                &
     &           sqss(ldsqss,*), coef(ldcoef,*), tlof(ldtlof,*),        &
     &           case(ldcase,*), wk(*)
      end

      interface to subroutine rcomp (nvar, xmin, xmax, ncentr, ifrep,   &
     &           npts, x, ldx)
      integer    nvar, ncentr, ifrep, npts, ldx
      real       xmin(*), xmax(*), x(ldx,*)
      end

      interface to subroutine rforp (nobs, ncol, x, ldx, irsp, ind,     &
     &           ifrq, iwt, maxdeg, icrit, crit, lof, ndeg, smultc,     &
     &           saddc, a, b, scoef, d, dfe, sse, dfpe, sspe, nrmiss)
      integer    nobs, ncol, ldx, irsp, ind, ifrq, iwt, maxdeg, icrit,  &
     &           lof, ndeg, nrmiss
      real       crit, smultc, saddc, dfe, sse, dfpe, sspe, x(*),       &
     &           a(*), b(*), scoef(*), d(*)
      end

      interface to subroutine r2orp (nobs, ncol, x, ldx, irsp, ind,     &
     &           ifrq, iwt, maxdeg, icrit, crit, lof, ndeg, smultc,     &
     &           saddc, a, b, scoef, ssorp, dfe, sse, dfpe, sspe,       &
     &           nrmiss, wk, iwk)
      integer    nobs, ncol, ldx, irsp, ind, ifrq, iwt, maxdeg, icrit,  &
     &           lof, ndeg, nrmiss, iwk(*)
      real       crit, smultc, saddc, dfe, sse, dfpe, sspe, x(ldx,*),   &
     &           a(*), b(*), scoef(*), ssorp(*), wk(*)
      end

      interface to subroutine rstap (ndeg, a, b, smultc, saddc, scoef,  &
     &           d, dfe, sse, lof, dfpe, sspe, iprint, aov, sqss,       &
     &           ldsqss, coef, ldcoef, tlof, ldtlof)
      integer    ndeg, lof, iprint, ldsqss, ldcoef, ldtlof
      real       smultc, saddc, dfe, sse, dfpe, sspe, a(*), b(*),       &
     &           scoef(*), d(*), aov(*), sqss(*), coef(*), tlof(*)
      end

      interface to subroutine r2tap (ndeg, a, b, smultc, saddc, scoef,  &
     &           d, dfe, sse, lof, dfpe, sspe, iprint, aov, sqss,       &
     &           ldsqss, coef, ldcoef, tlof, ldtlof, wk)
      integer    ndeg, lof, iprint, ldsqss, ldcoef, ldtlof
      real       smultc, saddc, dfe, sse, dfpe, sspe, a(*), b(*),       &
     &           scoef(*), d(*), aov(*), sqss(ldsqss,*),                &
     &           coef(ldcoef,*), tlof(ldtlof,*), wk(*)
      end

      interface to subroutine rcasp (nobs, ncol, x, ldx, irsp, ind, iwt,&
     &           ipred, conpcm, conpcp, ndeg, smultc, saddc, a, b,      &
     &           scoef, d, sse, dfe, print, case, ldcase, nrmiss)
      integer    nobs, ncol, ldx, irsp, ind, iwt, ipred, ndeg, ldcase,  &
     &           nrmiss
      real       conpcm, conpcp, smultc, saddc, sse, dfe, x(*), a(*),   &
     &           b(*), scoef(*), d(*), case(*)
      character  print*(*)
      end

      interface to subroutine r2asp (nobs, ncol, x, ldx, irsp, ind, iwt,&
     &           ipred, conpcm, conpcp, ndeg, smultc, saddc, a, b,      &
     &           scoef, d, sse, dfe, print, case, ldcase, nrmiss, pwk)
      integer    nobs, ncol, ldx, irsp, ind, iwt, ipred, ndeg, ldcase,  &
     &           nrmiss
      real       conpcm, conpcp, smultc, saddc, sse, dfe, x(ldx,*),     &
     &           a(*), b(*), scoef(*), d(*), case(ldcase,*), pwk(*)
      character  print*(*)
      end

      interface to subroutine opoly (n, x, iwt, wt, ndeg, smultc, saddc,&
     &           sx, a, b, poly, ldpoly)
      integer    n, iwt, ndeg, ldpoly
      real       smultc, saddc, x(*), wt(*), sx(*), a(*), b(*),         &
     &           poly(ldpoly,*)
      end

      interface to subroutine gcscp (ido, nrx, nvar, x, ldx, isub,      &
     &           xmean, scpm, cscp, ldcscp, nrmiss, nvobs)
      integer    ido, nrx, nvar, ldx, isub, ldcscp, nrmiss, nvobs
      real       x(ldx,*), xmean(*), scpm(*), cscp(ldcscp,*)
      end

      interface to subroutine tcscp (nvar, xmean, scpm, bc, b)
      integer    nvar
      real       xmean(*), scpm(*), bc(*), b(*)
      end

      interface to subroutine rnlin (func, nparm, ideriv, theta, r, ldr,&
     &           irank, dfe, sse)
      integer    nparm, ideriv, ldr, irank
      real       dfe, sse, theta(*), r(*)
      external   func
      end

      interface to subroutine r2lin (func, nparm, ideriv, theta, r, ldr,&
     &           irank, dfe, sse, iparam, rparam, scale, iwk, wk)
      integer    nparm, ideriv, ldr, irank, iparam(*), iwk(*)
      real       dfe, sse, theta(*), r(*), rparam(*), scale(*), wk(*)
      external   func
      end

      interface to subroutine r8lin (iparam, rparam)
      integer    iparam(*)
      real       rparam(*)
      end

      interface to subroutine rlav (nobs, ncol, x, ldx, intcep, iind,   &
     &           indind, irsp, b, irank, sae, iter, nrmiss)
      integer    nobs, ncol, ldx, intcep, iind, irsp, irank, iter,      &
     &           nrmiss, indind(*)
      real       sae, x(*), b(*)
      end

      interface to subroutine r2av (nobs, ncol, x, ldx, intcep, iind,   &
     &           indind, irsp, b, irank, sae, iter, nrmiss, iwk, wk)
      integer    nobs, ncol, ldx, intcep, iind, irsp, irank, iter,      &
     &           nrmiss, indind(*), iwk(*)
      real       sae, x(*), b(*), wk(*)
      end

      interface to subroutine rllp (nobs, ncol, x, ldx, intcep, iind,   &
     &           indind, irsp, ifrq, iwt, p, tol, maxit, eps, b, r, ldr,&
     &           irank, dfe, e, scale2, elp, iter, nrmiss)
      integer    nobs, ncol, ldx, intcep, iind, irsp, ifrq, iwt,        &
     &           maxit, ldr, irank, iter, nrmiss, indind(*)
      real       p, tol, eps, dfe, scale2, elp, x(*), b(*), r(*), e(*)
      end

      interface to subroutine r2lp (nobs, ncol, x, ldx, intcep, iind,   &
     &           indind, irsp, ifrq, iwt, p, tol, maxit, eps, b, r, ldr,&
     &           irank, dfe, e, scale2, elp, iter, nrmiss, iwk, wk)
      integer    nobs, ncol, ldx, intcep, iind, irsp, ifrq, iwt,        &
     &           maxit, ldr, irank, iter, nrmiss, indind(*), iwk(*)
      real       p, tol, eps, dfe, scale2, elp, x(ldx,*), b(*), r(*),   &
     &           e(*), wk(*)
      end

      interface to subroutine rlmv (nobs, ncol, x, ldx, intcep, iind,   &
     &           indind, irsp, b, irank, aemax, iter, nrmiss)
      integer    nobs, ncol, ldx, intcep, iind, irsp, irank, iter,      &
     &           nrmiss, indind(*)
      real       aemax, x(*), b(*)
      end

      interface to subroutine r2mv (nobs, ncol, x, ldx, intcep, iind,   &
     &           indind, irsp, b, irank, aemax, iter, nrmiss, wk)
      integer    nobs, ncol, ldx, intcep, iind, irsp, irank, iter,      &
     &           nrmiss, indind(*)
      real       aemax, x(*), b(*), wk(*)
      end

$IF .NOT. DEFINED (IMSL_COMMON_SINGLE)

      interface to subroutine rline (nobs, xdata, ydata, b0, b1, stat)
      integer    nobs
      real       b0, b1, xdata(*), ydata(*), stat(12)
      end

      interface to subroutine rcurv (nobs, xdata, ydata, ndeg, b,       &
     &           sspoly, stat)
      integer    nobs, ndeg
      real       xdata(*), ydata(*), b(*), sspoly(*), stat(10)
      end

      interface to subroutine r2urv (nobs, x, y, ndeg, b, sspoly, stat, &
     &           wk, iwk)
      integer    nobs, ndeg, iwk(*)
      real       x(*), y(*), b(*), sspoly(*), stat(10), wk(*)
      end

$ENDIF

!
!     Chapter 3:  Correlation
!

      interface to subroutine corvc (ido, nrow, nvar, x, ldx, ifrq, iwt,&
     &           mopt, icopt, xmean, cov, ldcov, incd, ldincd, nobs,    &
     &           nmiss, sumwt)
      integer    ido, nrow, nvar, ldx, ifrq, iwt, mopt, icopt, ldcov,   &
     &           ldincd, nobs, nmiss, incd(*)
      real       sumwt, x(*), xmean(*), cov(*)
      end

      interface to subroutine c2rvc (ido, nrow, nvar, x, ldx, ifrq, iwt,&
     &           mopt, icopt, xmean, cov, ldcov, incd, ldincd, nobs,    &
     &           nmiss, sumwt, wk)
      integer    ido, nrow, nvar, ldx, ifrq, iwt, mopt, icopt, ldcov,   &
     &           ldincd, nobs, nmiss, incd(ldincd,*)
      real       sumwt, x(ldx,*), xmean(*), cov(ldcov,*), wk(*)
      end

      interface to subroutine covpl (ido, nrow, nvar, ncol, x, ldx, ind,&
     &           ifrq, iwt, ngroup, igrp, ni, swt, xmean, ldxmea, cov,  &
     &           ldcov, nrmiss)
      integer    ido, nrow, nvar, ncol, ldx, ifrq, iwt, ngroup, igrp,   &
     &           ldxmea, ldcov, nrmiss, ind(*), ni(*)
      real       x(*), swt(*), xmean(*), cov(*)
      end

      interface to subroutine c2vpl (ido, nrow, nvar, ncol, x, ldx, ind,&
     &           ifrq, iwt, ngroup, igrp, ni, swt, xmean, ldxmea, cov,  &
     &           ldcov, nrmiss, d, ob, xval, dif)
      integer    ido, nrow, nvar, ncol, ldx, ifrq, iwt, ngroup, igrp,   &
     &           ldxmea, ldcov, nrmiss, ind(*), ni(*)
      real       x(ldx,*), swt(*), xmean(ldxmea,*), cov(ldcov,*),       &
     &           d(*), ob(*), xval(nvar,*), dif(*)
      end

      interface to subroutine pcorr (nvar, cor, ldcor, ndf, icor, nind, &
     &           ind, ndep, inddep, pcor, ldpcor, ndfp, pval, ldpval)
      integer    nvar, ldcor, ndf, icor, nind, ndep, ldpcor, ndfp,      &
     &           ldpval, ind(*), inddep(*)
      real       cor(*), pcor(*), pval(*)
      end

      interface to subroutine p2orr (nvar, cor, ldcor, ndf, icor, nind, &
     &           ind, ndep, inddep, pcor, ldpcor, ndfp, pval, ldpval,   &
     &           sxy, sxx, lx, iy, ix)
      integer    nvar, ldcor, ndf, icor, nind, ndep, ldpcor, ndfp,      &
     &           ldpval, lx, ind(*), inddep(*), iy(*), ix(*)
      real       cor(ldcor,*), pcor(ldpcor,*), pval(ldpval,*),          &
     &           sxy(lx,*), sxx(lx,*)
      end

      interface to subroutine rbcov (wghts, nobs, nvar, ncol, x, ldx,   &
     &           ind, ifrq, iwt, ngroup, igrp, init, imth, percnt,      &
     &           maxit, eps, ni, swt, xmean, ldxmea, cov, ldcov, const, &
     &           nrmiss)
      integer    nobs, nvar, ncol, ldx, ifrq, iwt, ngroup, igrp, init,  &
     &           imth, maxit, ldxmea, ldcov, nrmiss, ind(*), ni(*)
      real       percnt, eps, x(*), swt(*), xmean(*), cov(*), const(*)
      external   wghts
      end

      interface to subroutine r2cov (wghts, nobs, nvar, ncol, x, ldx,   &
     &           ind, ifrq, iwt, ngroup, igrp, init, imth, percnt,      &
     &           maxit, eps, ni, swt, xmean, ldxmea, cov, ldcov, const, &
     &           nrmiss, d, u, gxb, ob, ob1, ob2, sww, wk, irn, isf)
      integer    nobs, nvar, ncol, ldx, ifrq, iwt, ngroup, igrp, init,  &
     &           imth, maxit, ldxmea, ldcov, nrmiss, ind(*), ni(*),     &
     &           irn(*), isf(*)
      real       percnt, eps, x(ldx,*), swt(*), xmean(ldxmea,*),        &
     &           cov(ldcov,*), const(*), d(*), u(nvar,nvar,*),          &
     &           gxb(nvar,*), ob(*), ob1(*), ob2(*), sww(*), wk(*)
      external   wghts
      end

      interface to subroutine r5cov (r, nvar, percnt, uu, ww, up)
      integer    nvar
      real       r, percnt, uu, ww, up
      end

      interface to subroutine ctrho (nrow, ncol, table, ldtabl, eps,    &
     &           rho, var, pltmy, prob, ldprob, deriv, ldderi)
      integer    nrow, ncol, ldtabl, ldprob, ldderi
      real       eps, rho, var, table(ldtabl,*), pltmy(*),              &
     &           prob(ldprob,*), deriv(ldderi,*)
      end

      interface to subroutine tetcc (ido, nrow, x, y, hx, hy, icount,   &
     &           ldicou, nr, r, rs)
      integer    ido, nrow, ldicou, nr, icount(ldicou,*)
      real       hx, hy, rs, x(*), y(*), r(*)
      end

      interface to subroutine bspbs (k, a, lda, stat)
      integer    k, lda
      real       a(lda,*), stat(*)
      end

      interface to subroutine bscat (k, a, lda, stat)
      integer    k, lda
      real       a(lda,*), stat(*)
      end

      interface to subroutine cncrd (nobs, k, x, ldx, fuzz, sums, stat)
      integer    nobs, k, ldx
      real       fuzz, x(*), sums(*), stat(*)
      end

      interface to subroutine c2crd (nobs, k, x, ldx, fuzz, sums, stat, &
     &           iwk, xwk)
      integer    nobs, k, ldx, iwk(*)
      real       fuzz, x(ldx,*), sums(*), stat(*), xwk(*)
      end

      interface to subroutine kendl (nobs, x, y, fuzz, stat, freq)
      integer    nobs
      real       fuzz, x(*), y(*), stat(*), freq(*)
      end

      interface to subroutine k2ndl (nobs, x, y, fuzz, stat, freq, iwk, &
     &           wk, xrnk, yrnk)
      integer    nobs, iwk(*)
      real       fuzz, x(*), y(*), stat(*), freq(*), wk(*), xrnk(*),    &
     &           yrnk(*)
      end

      interface to subroutine kendp (nobs, k, freq, prob)
      integer    nobs, k
      real       prob, freq(*)
      end

      interface to subroutine k2ndp (nobs, k, freq, prob, fwk)
      integer    nobs, k
      real       prob, freq(*), fwk(*)
      end

!
!     Chapter 4:  Analysis of Variance
!

      interface to subroutine aonew (ngroup, ni, y, iprint, aov, stat,  &
     &           ldstat, nmiss)
      integer    ngroup, iprint, ldstat, nmiss, ni(*)
      real       y(*), aov(15), stat(ldstat,*)
      end

      interface to subroutine aonec (ngroup, ni, ncov, xy, ldxy, itest, &
     &           iprint, coef, ldcoef, r, ldr, aov, ptss, testpl,       &
     &           xymean, ldxyme, covm, ldcovm, covb, ldcovb, nrmiss)
      integer    ngroup, ncov, ldxy, itest, iprint, ldcoef, ldr,        &
     &           ldxyme, ldcovm, ldcovb, nrmiss, ni(*)
      real       xy(ldxy,*), coef(ldcoef,*), r(ldr,*), aov(*),          &
     &           ptss(*), testpl(*), xymean(ldxyme,*), covm(ldcovm,*),  &
     &           covb(ldcovb,*)
      end

      interface to subroutine a2nec (ngroup, ni, ncov, xy, ldxy, itest, &
     &           iprint, coef, ldcoef, r, ldr, aov, ptss, testpl,       &
     &           xymean, ldxyme, covm, ldcovm, covb, ldcovb, nrmiss, wk)
      integer    ngroup, ncov, ldxy, itest, iprint, ldcoef, ldr,        &
     &           ldxyme, ldcovm, ldcovb, nrmiss, ni(*)
      real       xy(ldxy,*), coef(ldcoef,*), r(ldr,*), aov(*),          &
     &           ptss(*), testpl(*), xymean(ldxyme,*), covm(ldcovm,*),  &
     &           covb(ldcovb,*), wk(*)
      end

      interface to subroutine atwob (nblk, ntrt, nresp, y, iprint, aov, &
     &           efss, testlf, ymeans)
      integer    nblk, ntrt, nresp, iprint
      real       y(nresp,nblk,*), aov(*), efss(2,*), testlf(*),         &
     &           ymeans(*)
      end

      interface to subroutine abibd (ntrt, nrep, nblk, ntblk, nresp, y, &
     &           itrt, inter, iprint, aov, sqss, ssalt, testlf, ymeans, &
     &           setrtd, efncy)
      integer    ntrt, nrep, nblk, ntblk, nresp, inter, iprint, itrt(*)
      real       setrtd, efncy, y(*), aov(*), sqss(3,*), ssalt(*),      &
     &           testlf(*), ymeans(*)
      end

      interface to subroutine a2ibd (ntrt, nrep, nblk, ntblk, nresp, y, &
     &           itrt, inter, iprint, aov, sqss, ssalt, testlf, ymeans, &
     &           setrtd, efncy, wk)
      integer    ntrt, nrep, nblk, ntblk, nresp, inter, iprint, itrt(*)
      real       setrtd, efncy, y(*), aov(*), sqss(3,*), ssalt(*),      &
     &           testlf(*), ymeans(*), wk(*)
      end

      interface to subroutine alatn (ntrt, nresp, y, itrt, iprint, aov, &
     &           efss, testlf, ymeans)
      integer    ntrt, nresp, iprint, itrt(ntrt,*)
      real       y(nresp,ntrt,*), aov(*), efss(3,*), testlf(*),         &
     &           ymeans(*)
      end

      interface to subroutine anway (nf, nl, y, intera, iprint, aov,    &
     &           efss, ldefss, ymeans)
      integer    nf, intera, iprint, ldefss, nl(*)
      real       y(*), aov(*), efss(ldefss,*), ymeans(*)
      end

      interface to subroutine a2way (nf, nl, y, intera, iprint, aov,    &
     &           efss, ldefss, ymeans, wk, iwk)
      integer    nf, intera, iprint, ldefss, nl(*), iwk(*)
      real       y(*), aov(*), efss(ldefss,*), ymeans(*), wk(*)
      end

      interface to subroutine abald (nf, nl, y, nrf, indrf, nef, nfef,  &
     &           indef, conper, iprint, model, aov, ems, vc, ldvc,      &
     &           ymeans)
      integer    nf, nrf, nef, iprint, model, ldvc, nl(*), indrf(*),    &
     &           nfef(*), indef(*)
      real       conper, y(*), aov(*), ems(*), vc(ldvc,*), ymeans(*)
      end

      interface to subroutine a2ald (nf, nl, y, nrf, indrf, nef, nfef,  &
     &           indef, conper, iprint, model, aov, ems, vc, ldvc,      &
     &           ymeans, wk, iwk, c13ksp)
      integer    nf, nrf, nef, iprint, model, ldvc, nl(*), indrf(*),    &
     &           nfef(*), indef(*), iwk(*)
      real       conper, y(*), aov(*), ems(*), vc(ldvc,*), ymeans(*),   &
     &           wk(*)
      character  c13ksp(*)*13
      end

      interface to subroutine anest (nf, ieq, nl, y, conper, iprint,    &
     &           aov, ems, vc, ldvc, ymeans, nmiss)
      integer    nf, ieq, iprint, ldvc, nmiss, nl(*)
      real       conper, y(*), aov(*), ems(*), vc(ldvc,*), ymeans(*)
      end

      interface to subroutine a2est (nf, ieq, nl, y, conper, iprint,    &
     &           aov, ems, vc, ldvc, ymeans, nmiss, wk, iwk, c10wk)
      integer    nf, ieq, iprint, ldvc, nmiss, nl(*), iwk(*)
      real       conper, y(*), aov(*), ems(*), vc(ldvc,*), ymeans(*),   &
     &           wk(*)
      character  c10wk(*)*10
      end

      interface to subroutine ctrst (ngroup, ni, ymeans, nctrst, c, ldc,&
     &           est, ss)
      integer    ngroup, nctrst, ldc, ni(*)
      real       ymeans(*), c(ldc,*), est(*), ss(*)
      end

      interface to subroutine scipm (ngroup, ni, ymeans, dfs2, s2,      &
     &           imeth, conper, iprint, stat, ldstat)
      integer    ngroup, imeth, iprint, ldstat, ni(*)
      real       dfs2, s2, conper, ymeans(*), stat(*)
      end

      interface to subroutine s2ipm (ngroup, ni, ymeans, dfs2, s2,      &
     &           imeth, conper, iprint, stat, ldstat, wk, iwk)
      integer    ngroup, imeth, iprint, ldstat, ni(*), iwk(*)
      real       dfs2, s2, conper, ymeans(*), stat(ldstat,*), wk(*)
      end

      interface to subroutine snkmc (ngroup, ymeans, semean, dfse,      &
     &           alpha, iprint, ieqmns)
      integer    ngroup, iprint, ieqmns(*)
      real       semean, dfse, alpha, ymeans(*)
      end

      interface to subroutine s2kmc (ngroup, ymeans, semean, dfse,      &
     &           alpha, iprint, ieqmns, wk, iwk)
      integer    ngroup, iprint, ieqmns(*), iwk(*)
      real       semean, dfse, alpha, ymeans(*), wk(*)
      end

      interface to subroutine cidms (df1, efms1, df2, efms2, vchat,     &
     &           conper, imeth, ci)
      integer    imeth
      real       df1, efms1, df2, efms2, vchat, conper, ci(*)
      end

      interface to subroutine rorex (nf, nl, iord, yin, jord, yout)
      integer    nf, nl(*), iord(*), jord(*)
      real       yin(*), yout(*)
      end

      interface to subroutine r2rex (nf, nl, iord, yin, jord, yout, iwk)
      integer    nf, nl(*), iord(*), jord(*), iwk(*)
      real       yin(*), yout(*)
      end

!
!     Chapter 5:  Categorical and Discrete Data Analysis
!

      interface to subroutine cttwo (table, ldtabl, icmpt, iprint,      &
     &           expect, ldexpe, chi, ldchi, chisq, stat, ldstat)
      integer    ldtabl, icmpt, iprint, ldexpe, ldchi, ldstat
      real       table(ldtabl,2), expect(ldexpe,3), chi(ldchi,3),       &
     &           chisq(15), stat(ldstat,5)
      end

      interface to subroutine ctchi (nrow, ncol, table, ldtabl, icmpt,  &
     &           iprint, expect, ldexpe, chi, ldchi, chisq, stat,       &
     &           ldstat)
      integer    nrow, ncol, ldtabl, icmpt, iprint, ldexpe, ldchi,      &
     &           ldstat
      real       table(ldtabl,*), expect(ldexpe,*), chi(ldchi,*),       &
     &           chisq(10), stat(ldstat,5)
      end

      interface to subroutine ctprb (nrow, ncol, table, ldtabl, prt,    &
     &           pre, pchek)
      integer    nrow, ncol, ldtabl
      real       prt, pre, pchek, table(*)
      end

      interface to subroutine c2prb (nrow, ncol, table, ldtabl, prt,    &
     &           pre, pchek, iwk)
      integer    nrow, ncol, ldtabl, iwk(*)
      real       prt, pre, pchek, table(ldtabl,*)
      end

      interface to subroutine ctepr (nrow, ncol, table, ldtabl, expect, &
     &           percnt, emin, prt, pre)
      integer    nrow, ncol, ldtabl
      real       expect, percnt, emin, prt, pre, table(*)
      end

      interface to subroutine c2epr (nrow, ncol, table, ldtabl, expect, &
     &           percnt, emin, prt, pre, fact, ico, iro, kyy, idif, irn,&
     &           key, ldkey, ipoin, stp, ldstp, ifrq, dlp, dsp, tm,     &
     &           key2, iwk, rwk)
      integer    nrow, ncol, ldtabl, ldkey, ldstp, ico(*), iro(*),      &
     &           kyy(*), idif(*), irn(*), key(*), ipoin(*), ifrq(*),    &
     &           key2(*), iwk(*)
      real       expect, percnt, emin, prt, pre, table(ldtabl,*),       &
     &           fact(0:*), stp(*), dlp(*), dsp(*), tm(*), rwk(*)
      end

      interface to subroutine prpft (nclvar, nclval, table, nef, nvef,  &
     &           indef, eps, maxit, fit)
      integer    nclvar, nef, maxit, nclval(*), nvef(*), indef(*)
      real       eps, table(*), fit(*)
      end

      interface to subroutine p2pft (nclvar, nclval, table, nef, nvef,  &
     &           indef, eps, maxit, fit, amar, index, wk, iwk)
      integer    nclvar, nef, maxit, nclval(*), nvef(*), indef(*),      &
     &           index(*), iwk(*)
      real       eps, table(*), fit(*), amar(*), wk(*)
      end

      interface to subroutine ctlln (nclvar, nclval, table, nef, nvef,  &
     &           indef, eps, maxit, tol, iprint, fit, ncoef, coef,      &
     &           ldcoef, cov, ldcov, resid, ldresi, stat)
      integer    nclvar, nef, maxit, iprint, ncoef, ldcoef, ldcov,      &
     &           ldresi, nclval(*), nvef(*), indef(*)
      real       eps, tol, table(*), fit(*), coef(*), cov(*),           &
     &           resid(*), stat(*)
      end

      interface to subroutine c2lln (nclvar, nclval, table, nef, nvef,  &
     &           indef, eps, maxit, tol, iprint, fit, ncoef, coef,      &
     &           ldcoef, cov, ldcov, resid, ldresi, stat, amar, indx,   &
     &           ncvef, ixef, iindef, ia, indcl, clval, reg, x, d, xmin,&
     &           xmax, covwk, wk, iwk)
      integer    nclvar, nef, maxit, iprint, ncoef, ldcoef, ldcov,      &
     &           ldresi, nclval(*), nvef(*), indef(*), indx(*),         &
     &           ncvef(*), ixef(*), iindef(*), ia(*), indcl(*), iwk(*)
      real       eps, tol, table(*), fit(*), coef(ldcoef,*),            &
     &           cov(ldcov,*), resid(ldresi,*), stat(*), amar(*),       &
     &           clval(*), reg(*), x(*), d(*), xmin(*), xmax(*),        &
     &           covwk(*), wk(*)
      end

      interface to subroutine ctpar (nclvar, nclval, nef, nvef, indef,  &
     &           fit, tol, iprint, ncoef, coef, ldcoef, cov, ldcov)
      integer    nclvar, nef, iprint, ncoef, ldcoef, ldcov, nclval(*),  &
     &           nvef(*), indef(*)
      real       tol, fit(*), coef(*), cov(*)
      end

      interface to subroutine c2par (nclvar, nclval, nef, nvef, indef,  &
     &           fit, tol, iprint, ncoef, coef, ldcoef, cov, ldcov,     &
     &           irank, ncvef, ixef, iindef, ia, indcl, clval, reg, x,  &
     &           d, xmin, xmax, wk)
      integer    nclvar, nef, iprint, ncoef, ldcoef, ldcov, irank,      &
     &           nclval(*), nvef(*), indef(*), ncvef(*), ixef(*),       &
     &           iindef(*), ia(*), indcl(*)
      real       tol, fit(*), coef(ldcoef,*), cov(ldcov,*), clval(*),   &
     &           reg(*), x(*), d(*), xmin(*), xmax(*), wk(*)
      end

      interface to subroutine ctasc (nclvar, nclval, table, zero, eps,  &
     &           maxit, iprint, assoc, ldasso, chihi, ldchih, chisim,   &
     &           ldchis)
      integer    nclvar, maxit, iprint, ldasso, ldchih, ldchis,         &
     &           nclval(*)
      real       eps, table(*), zero(*), assoc(*), chihi(*), chisim(*)
      end

      interface to subroutine c2asc (nclvar, nclval, table, zero, eps,  &
     &           maxit, iprint, assoc, ldasso, chihi, ldchih, chisim,   &
     &           ldchis, fitwk, ncvef, ixef, amar, indx, wk, iwk, covwk)
      integer    nclvar, maxit, iprint, ldasso, ldchih, ldchis,         &
     &           nclval(*), ncvef(*), ixef(*), indx(*), iwk(*)
      real       eps, table(*), zero(*), assoc(ldasso,*),               &
     &           chihi(ldchih,*), chisim(ldchis,*), fitwk(*), amar(*),  &
     &           wk(*), covwk(*)
      end

      interface to subroutine ctstp (ido, nclvar, nclval, table, pin,   &
     &           pout, istep, nstep, nforce, iprint, nef, nvef, maxnvf, &
     &           indef, maxind, fit, stat, iend)
      integer    ido, nclvar, istep, nstep, nforce, iprint, nef,        &
     &           maxnvf, maxind, iend, nclval(*), nvef(*), indef(*)
      real       pin, pout, table(*), fit(*), stat(*)
      end

      interface to subroutine c2stp (ido, nclvar, nclval, table, pin,   &
     &           pout, istep, nstep, nforce, iprint, nef, nvef, maxnvf, &
     &           indef, maxind, fit, stat, iend, maxmar, amar, invef,   &
     &           iindef, idf, zwk, rwk, iwk)
      integer    ido, nclvar, istep, nstep, nforce, iprint, nef,        &
     &           maxnvf, maxind, iend, maxmar, nclval(*), nvef(*),      &
     &           indef(*), invef(*), iindef(*), idf(*), iwk(*)
      real       pin, pout, table(*), fit(*), stat(*), amar(*),         &
     &           zwk(*), rwk(*)
      end

      interface to subroutine ctran (nclvar, nclval, table, indrow,     &
     &           indcol, itype, irowsc, icolsc, iprint, rowscr, colscr, &
     &           stat, ldstat)
      integer    nclvar, indrow, indcol, itype, irowsc, icolsc,         &
     &           iprint, ldstat, nclval(*)
      real       table(*), rowscr(*), colscr(*), stat(ldstat,*)
      end

      interface to subroutine c2ran (nclvar, nclval, table, indrow,     &
     &           indcol, itype, irowsc, icolsc, iprint, rowscr, colscr, &
     &           stat, ldstat, ix, f, colsum, rowsum, difvec, difsum,   &
     &           cov, covsum, awk, bwk)
      integer    nclvar, indrow, indcol, itype, irowsc, icolsc,         &
     &           iprint, ldstat, nclval(*), ix(*)
      real       table(*), rowscr(*), colscr(*), stat(ldstat,*), f(*),  &
     &           colsum(*), rowsum(*), difvec(*), difsum(*), cov(*),    &
     &           covsum(*), awk(*), bwk(*)
      end

      interface to subroutine ctglm (nobs, ncol, x, ldx, model, ilt,    &
     &           irt, ifrq, ifix, ipar, icen, infin, maxit, eps, intcep,&
     &           nclvar, indcl, nef, nvef, indef, init, iprint, maxcl,  &
     &           nclval, clval, ncoef, coef, ldcoef, algl, cov, ldcov,  &
     &           xmean, case, ldcase, gr, iadd, nrmiss)
      integer    nobs, ncol, ldx, model, ilt, irt, ifrq, ifix, ipar,    &
     &           icen, infin, maxit, intcep, nclvar, nef, init,         &
     &           iprint, maxcl, ncoef, ldcoef, ldcov, ldcase, nrmiss,   &
     &           indcl(*), nvef(*), indef(*), nclval(*), iadd(*)
      real       eps, algl, x(*), clval(*), coef(*), cov(*), xmean(*),  &
     &           case(*), gr(*)
      end

      interface to subroutine c2glm (nobs, ncol, x, ldx, model, ilt,    &
     &           irt, ifrq, ifix, ipar, icen, infin, maxit, eps, intcep,&
     &           nclvar, indcl, nef, nvef, indef, init, iprint, maxcl,  &
     &           nclval, clval, ncoef, coef, ldcoef, algl, cov, ldcov,  &
     &           xmean, case, ldcase, gr, iadd, nrmiss, nmax, obs, addx,&
     &           xd, wk, kbasis)
      integer    nobs, ncol, ldx, model, ilt, irt, ifrq, ifix, ipar,    &
     &           icen, infin, maxit, intcep, nclvar, nef, init,         &
     &           iprint, maxcl, ncoef, ldcoef, ldcov, ldcase, nrmiss,   &
     &           nmax, indcl(*), nvef(*), indef(*), nclval(*),          &
     &           iadd(*), kbasis(*)
      real       eps, algl, x(*), clval(*), coef(ldcoef,*),             &
     &           cov(ldcov,*), xmean(*), case(ldcase,*), gr(*),         &
     &           obs(*), xd(*), wk(*)
      logical    addx(*)
      end

      interface to subroutine ctwls (nresp, npop, table, ldtabl, ntran, &
     &           itran, isize, amats, ncoef, x, ldx, numh, nh, h, ldh,  &
     &           iprint, chsq, ldchsq, coef, ldcoef, covcf, ldcovc, f,  &
     &           covf, ldcovf, resid, ldresi)
      integer    nresp, npop, ldtabl, ntran, ncoef, ldx, numh, ldh,     &
     &           iprint, ldchsq, ldcoef, ldcovc, ldcovf, ldresi,        &
     &           itran(*), isize(*), nh(*)
      real       table(*), amats(*), x(*), h(*), chsq(*), coef(*),      &
     &           covcf(*), f(*), covf(*), resid(*)
      end

      interface to subroutine c2wls (nresp, npop, table, ldtabl, ntran, &
     &           itran, isize, amats, ncoef, x, ldx, numh, nh, h, ldh,  &
     &           iprint, chsq, ldchsq, coef, ldcoef, covcf, ldcovc, f,  &
     &           covf, ldcovf, resid, ldresi, pder, frq, est, xx, wk,   &
     &           iwk, wwk)
      integer    nresp, npop, ldtabl, ntran, ncoef, ldx, numh, ldh,     &
     &           iprint, ldchsq, ldcoef, ldcovc, ldcovf, ldresi,        &
     &           itran(*), isize(*), nh(*), iwk(*)
      real       table(ldtabl,*), amats(*), x(ldx,*), h(ldh,*),         &
     &           chsq(ldchsq,*), coef(ldcoef,*), covcf(ldcovc,*),       &
     &           f(*), covf(ldcovf,*), resid(ldresi,*), pder(*),        &
     &           frq(*), est(*), xx(*), wk(*), wwk(*)
      end

!
!     Chapter 6:  Nonparametric Statistics
!

      interface to subroutine signt (nobs, x, q, p, npos, ntie, prob,   &
     &           nmiss)
      integer    nobs, npos, ntie, nmiss
      real       q, p, prob, x(*)
      end

      interface to subroutine snrnk (nobs, y, fuzz, stat, nmiss)
      integer    nobs, nmiss
      real       fuzz, y(*), stat(*)
      end

      interface to subroutine s2rnk (nobs, y, fuzz, stat, nmiss, ir,    &
     &           yrank)
      integer    nobs, nmiss, ir(*)
      real       fuzz, y(*), stat(*), yrank(*)
      end

      interface to subroutine nctrd (nobs, x, fuzz, nstat, p, nmiss)
      integer    nobs, nmiss, nstat(*)
      real       fuzz, x(*), p(*)
      end

      interface to subroutine sdplc (nobs, x, iopt, k, ids, fuzz, nstat,&
     &           pstat, nmiss)
      integer    nobs, iopt, k, ids, nmiss, nstat(*)
      real       fuzz, x(*), pstat(*)
      end

      interface to subroutine s2plc (nobs, x, iopt, k, ids, fuzz, nstat,&
     &           pstat, nmiss, xwk)
      integer    nobs, iopt, k, ids, nmiss, nstat(*)
      real       fuzz, x(*), pstat(*), xwk(*)
      end

      interface to subroutine nties (nobs, x, fuzz, ties)
      integer    nobs
      real       fuzz, x(*), ties(*)
      end

      interface to subroutine rnksm (nobsx, x, nobsy, y, fuzz, stat,    &
     &           nmissx, nmissy)
      integer    nobsx, nobsy, nmissx, nmissy
      real       fuzz, x(*), y(*), stat(*)
      end

      interface to subroutine r2ksm (nobsx, x, nobsy, y, fuzz, stat,    &
     &           nmissx, nmissy, iwk, ywk)
      integer    nobsx, nobsy, nmissx, nmissy, iwk(*)
      real       fuzz, x(*), y(*), stat(*), ywk(*)
      end

      interface to subroutine incld (nobsx, x, nobsy, y, ilx, ihx, fuzz,&
     &           stat, nmissx, nmissy)
      integer    nobsx, nobsy, ilx, ihx, nmissx, nmissy
      real       fuzz, x(*), y(*), stat(*)
      end

      interface to subroutine i2cld (nobsx, x, nobsy, y, ilx, ihx, fuzz,&
     &           stat, nmissx, nmissy, wk)
      integer    nobsx, nobsy, ilx, ihx, nmissx, nmissy
      real       fuzz, x(*), y(*), stat(*), wk(*)
      end

      interface to subroutine krskl (ngroup, ni, y, fuzz, stat)
      integer    ngroup, ni(*)
      real       fuzz, y(*), stat(*)
      end

      interface to subroutine k2skl (ngroup, ni, y, fuzz, stat, iwk, wk,&
     &           yrnk)
      integer    ngroup, ni(*), iwk(*)
      real       fuzz, y(*), stat(*), wk(*), yrnk(*)
      end

      interface to subroutine bhakv (ngroup, ni, y, v, prob)
      integer    ngroup, ni(*)
      real       v, prob, y(*)
      end

      interface to subroutine b2akv (ngroup, ni, y, v, prob, iwk, wk,   &
     &           ywk)
      integer    ngroup, ni(*), iwk(*)
      real       v, prob, y(*), wk(*), ywk(*)
      end

      interface to subroutine frdmn (nb, nt, y, fuzz, alpha, stat,      &
     &           smrnk, d)
      integer    nb, nt
      real       fuzz, alpha, d, y(*), stat(*), smrnk(*)
      end

      interface to subroutine f2dmn (nb, nt, y, fuzz, alpha, stat,      &
     &           smrnk, d, iwk, wk)
      integer    nb, nt, iwk(nt)
      real       fuzz, alpha, d, y(*), stat(*), smrnk(*), wk(*)
      end

      interface to subroutine qtest (nobs, nvar, x, ldx, q, pq)
      integer    nobs, nvar, ldx
      real       q, pq, x(ldx,*)
      end

      interface to subroutine ktrnd (ngroup, ni, x, stat)
      integer    ngroup, ni(*)
      real       x(*), stat(*)
      end

!
!     Chapter 7:  Tests of Goodness of Fit and Randomness
!

      interface to subroutine ksone (cdf, nobs, x, pdif, nmiss)
      integer    nobs, nmiss
      real       cdf, x(*), pdif(*)
      external   cdf
      end

      interface to subroutine k2one (cdf, nobs, x, pdif, nmiss, xwk)
      integer    nobs, nmiss
      real       cdf, x(*), pdif(*), xwk(*)
      external   cdf
      end

      interface to subroutine chigf (ido, cdf, nelm, x, freq, ncat,     &
     &           rnge, ndfest, cutp, counts, expect, chisq, p, df)
      integer    ido, nelm, ncat, ndfest
      real       cdf, p, df, x(*), freq(*), rnge(2), cutp(*),           &
     &           counts(*), expect(*), chisq(*)
      external   cdf
      end

      interface to subroutine spwlk (nobs, x, w, p, nmiss)
      integer    nobs, nmiss
      real       w, p, x(*)
      end

      interface to subroutine s2wlk (nobs, x, w, p, nmiss, wk)
      integer    nobs, nmiss
      real       w, p, x(*), wk(*)
      end

      interface to subroutine lillf (nobs, x, ipdf, xmean, std, dif,    &
     &           prob, nmiss)
      integer    nobs, ipdf, nmiss
      real       xmean, std, dif, prob, x(*)
      end

      interface to subroutine l2llf (nobs, x, ipdf, xmean, std, dif,    &
     &           prob, nmiss, xwk)
      integer    nobs, ipdf, nmiss
      real       xmean, std, dif, prob, x(*), xwk(*)
      end

      interface to subroutine mvmmt (nobs, nvar, ncol, x, ldx, ind,     &
     &           ifrq, iwt, icmput, ni, swt, xmean, r, ldr, stat,       &
     &           nrmiss)
      integer    nobs, nvar, ncol, ldx, ifrq, iwt, icmput, ni, ldr,     &
     &           nrmiss, ind(*)
      real       swt, x(*), xmean(*), r(*), stat(*)
      end

      interface to subroutine m2mmt (nobs, nvar, ncol, x, ldx, ind,     &
     &           ifrq, iwt, icmput, ni, swt, xmean, r, ldr, stat,       &
     &           nrmiss, d, ob, cc)
      integer    nobs, nvar, ncol, ldx, ifrq, iwt, icmput, ni, ldr,     &
     &           nrmiss, ind(*)
      real       swt, x(ldx,*), xmean(*), r(ldr,*), stat(*), d(*),      &
     &           ob(*), cc(nvar,nvar,*)
      end

      interface to subroutine kstwo (nobsx, x, nobsy, y, pdif, nmissx,  &
     &           nmissy)
      integer    nobsx, nobsy, nmissx, nmissy
      real       x(*), y(*), pdif(*)
      end

      interface to subroutine k2two (nobsx, x, nobsy, y, pdif, nmissx,  &
     &           nmissy, xwk, ywk)
      integer    nobsx, nobsy, nmissx, nmissy
      real       x(*), y(*), pdif(*), xwk(*), ywk(*)
      end

      interface to subroutine runs (ido, nran, x, nrun, count, expect,  &
     &           covar, ldcova, chisq, df, prob)
      integer    ido, nran, nrun, ldcova
      real       chisq, df, prob, x(*), count(*), expect(*), covar(*)
      end

      interface to subroutine r2ns (ido, nran, x, nrun, count, expect,  &
     &           covar, ldcova, chisq, df, prob, rwk, cwk, lrun, nobs,  &
     &           xlast)
      integer    ido, nran, nrun, ldcova, lrun, nobs
      real       chisq, df, prob, xlast, x(*), count(*), expect(*),     &
     &           covar(ldcova,*), rwk(*), cwk(nrun,*)
      end

      interface to subroutine pairs (ido, nran, x, ncell, lag, count,   &
     &           ldcoun, expect, chisq, df, prob)
      integer    ido, nran, ncell, lag, ldcoun
      real       expect, chisq, df, prob, x(*), count(ldcoun,*)
      end

      interface to subroutine dsqar (ido, nran, x, ncell, count, expect,&
     &           chisq, df, prob)
      integer    ido, nran, ncell
      real       expect, chisq, df, prob, x(*), count(*)
      end

      interface to subroutine dcube (ido, nran, x, ncell, count, ldcoun,&
     &           expect, chisq, df, prob)
      integer    ido, nran, ncell, ldcoun
      real       expect, chisq, df, prob, x(*), count(ldcoun,ldcoun,*)
      end

!
!     Chapter 8:  Time Series Analysis and Forecasting
!

      interface to subroutine bctr (nobs, z, iprint, idir, power, shift,&
     &           x)
      integer    nobs, iprint, idir
      real       power, shift, z(*), x(*)
      end

      interface to subroutine diff (nobsz, z, ndiff, iper, iord, iprint,&
     &           imiss, nlost, nobsx, x)
      integer    nobsz, ndiff, iprint, imiss, nlost, nobsx, iper(*),    &
     &           iord(*)
      real       z(*), x(*)
      end

      interface to subroutine d2ff (nobsz, z, ndiff, iper, iord, iprint,&
     &           imiss, nlost, nobsx, x, xwk)
      integer    nobsz, ndiff, iprint, imiss, nlost, nobsx, iper(*),    &
     &           iord(*)
      real       z(*), x(*), xwk(*)
      end

      interface to subroutine acf (nobs, x, iprint, iseopt, imean,      &
     &           xmean, maxlag, acv, ac, seac)
      integer    nobs, iprint, iseopt, imean, maxlag
      real       xmean, x(*), acv(0:*), ac(0:*), seac(*)
      end

      interface to subroutine pacf (maxlag, ac, pac)
      integer    maxlag
      real       ac(0:*), pac(*)
      end

      interface to subroutine p2cf (maxlag, ac, pac, wk)
      integer    maxlag
      real       ac(0:*), pac(*), wk(*)
      end

      interface to subroutine ccf (nobs, x, y, maxlag, iprint, iseopt,  &
     &           imean, xmean, ymean, xvar, yvar, ccv, cc, secc)
      integer    nobs, maxlag, iprint, iseopt, imean
      real       xmean, ymean, xvar, yvar, x(*), y(*), ccv(*), cc(*),   &
     &           secc(*)
      end

      interface to subroutine c2f (nobs, x, y, maxlag, iprint, iseopt,  &
     &           imean, xmean, ymean, xvar, yvar, ccv, cc, secc, acx,   &
     &           acy)
      integer    nobs, maxlag, iprint, iseopt, imean
      real       xmean, ymean, xvar, yvar, x(*), y(*), ccv(-maxlag:*),  &
     &           cc(-maxlag:*), secc(-maxlag:*), acx(0:*), acy(0:*)
      end

      interface to subroutine mccf (nobsx, nchanx, x, ldx, nobsy,       &
     &           nchany, y, ldy, maxlag, iprint, imean, xmean, ymean,   &
     &           xvar, yvar, ccv, ldccv, mdccv, cc, ldcc, mdcc)
      integer    nobsx, nchanx, ldx, nobsy, nchany, ldy, maxlag,        &
     &           iprint, imean, ldccv, mdccv, ldcc, mdcc
      real       x(ldx,*), y(ldy,*), xmean(*), ymean(*), xvar(*),       &
     &           yvar(*), ccv(ldccv,mdccv,-maxlag:*),                   &
     &           cc(ldcc,mdcc,-maxlag:*)
      end

      interface to subroutine armme (maxlag, acv, iprint, npma, npar,   &
     &           par)
      integer    maxlag, iprint, npma, npar
      real       acv(*), par(*)
      end

      interface to subroutine a2mme (maxlag, acv, iprint, npma, npar,   &
     &           par, a, fac, ipvt, wklslr)
      integer    maxlag, iprint, npma, npar, ipvt(*)
      real       acv(0:*), par(*), a(npar,*), fac(*), wklslr(*)
      end

      interface to subroutine mamme (maxlag, acv, iprint, npar, par,    &
     &           relerr, maxit, npma, pma)
      integer    maxlag, iprint, npar, maxit, npma
      real       relerr, acv(*), par(*), pma(*)
      end

      interface to subroutine m2mme (maxlag, acv, iprint, npar, par,    &
     &           relerr, maxit, npma, pma, parwk, acvmod, tauini, tau,  &
     &           fvec, fjac, r, qtf, wknln)
      integer    maxlag, iprint, npar, maxit, npma
      real       relerr, acv(0:*), par(*), pma(*), parwk(0:*),          &
     &           acvmod(0:*), tauini(0:*), tau(0:*), fvec(*), fjac(*),  &
     &           r(*), qtf(*), wknln(*)
      end

      interface to subroutine nspe (nobs, w, iprint, imean, wmean, npar,&
     &           npma, relerr, maxit, const, par, pma, avar)
      integer    nobs, iprint, imean, npar, npma, maxit
      real       wmean, relerr, const, avar, w(*), par(*), pma(*)
      end

      interface to subroutine n2pe (nobs, w, iprint, imean, wmean, npar,&
     &           npma, relerr, maxit, const, par, pma, avar, acv, parwk,&
     &           acvmod, tauini, tau, fvec, fjac, r, qtf, wknln, a, fac,&
     &           ipvt, wkarmm)
      integer    nobs, iprint, imean, npar, npma, maxit, ipvt(*)
      real       wmean, relerr, const, avar, w(*), par(*), pma(*),      &
     &           acv(0:*), parwk(*), acvmod(*), tauini(*), tau(0:*),    &
     &           fvec(*), fjac(*), r(*), qtf(*), wknln(*), a(*),        &
     &           fac(*), wkarmm(*)
      end

      interface to subroutine nslse (nobs, w, iprint, imean, wmean,     &
     &           npar, par, lagar, npma, pma, lagma, maxbc, tolbc,      &
     &           tolss, const, cov, ldcov, na, a, avar)
      integer    nobs, iprint, imean, npar, npma, maxbc, ldcov, na,     &
     &           lagar(*), lagma(*)
      real       wmean, tolbc, tolss, const, avar, w(*), par(*),        &
     &           pma(*), cov(*), a(*)
      end

      interface to subroutine n2lse (nobs, w, iprint, imean, wmean,     &
     &           npar, par, lagar, npma, pma, lagma, maxbc, tolbc,      &
     &           tolss, const, cov, ldcov, na, a, avar, xguess, xscale, &
     &           fscale, x, fvec, fjac, ldfjac, rwkunl, iwkunl, wknsre, &
     &           ai, fcst)
      integer    nobs, iprint, imean, npar, npma, maxbc, ldcov, na,     &
     &           ldfjac, lagar(*), lagma(*), iwkunl(*)
      real       wmean, tolbc, tolss, const, avar, w(*), par(*),        &
     &           pma(*), cov(ldcov,*), a(*), xguess(*), xscale(*),      &
     &           fscale(*), x(*), fvec(*), fjac(ldfjac,*), rwkunl(*),   &
     &           wknsre(*), ai(*), fcst(*)
      end

      interface to subroutine spwf (nobs, w, iwmean, wmean, wnadj, eps, &
     &           mlfop, lfop, fop)
      integer    nobs, iwmean, mlfop, lfop
      real       wmean, wnadj, eps, w(*), fop(*)
      end

      interface to subroutine s2wf (nobs, w, iwmean, wmean, wnadj, eps, &
     &           mlfop, lfop, fop, cw, wk)
      integer    nobs, iwmean, mlfop, lfop
      real       wmean, wnadj, eps, w(*), fop(*), cw(*), wk(*)
      end

      interface to subroutine nsbjf (nobs, w, iprint, npar, par, lagar, &
     &           npma, pma, lagma, iconst, const, avar, alpha, mxbkor,  &
     &           mxlead, fcst, ldfcst)
      integer    nobs, iprint, npar, npma, iconst, mxbkor, mxlead,      &
     &           ldfcst, lagar(*), lagma(*)
      real       const, avar, alpha, w(*), par(*), pma(*),              &
     &           fcst(ldfcst,*)
      end

      interface to subroutine n2bjf (nobs, w, iprint, npar, par, lagar, &
     &           npma, pma, lagma, iconst, const, avar, alpha, mxbkor,  &
     &           mxlead, fcst, ldfcst, parh, pmah, psih, psi, lagpsi)
      integer    nobs, iprint, npar, npma, iconst, mxbkor, mxlead,      &
     &           ldfcst, lagar(*), lagma(*), lagpsi(*)
      real       const, avar, alpha, w(*), par(*), pma(*),              &
     &           fcst(ldfcst,*), parh(*), pmah(*), psih(*), psi(*)
      end

      interface to subroutine irnse (nobs, x, y, iprint, npar, par,     &
     &           npma, pma, mwtir, mwtsn, wtir, snoise, xpw, ypw)
      integer    nobs, iprint, npar, npma, mwtir, mwtsn
      real       x(*), y(*), par(*), pma(*), wtir(*), snoise(*),        &
     &           xpw(*), ypw(*)
      end

      interface to subroutine i2nse (nobs, x, y, iprint, npar, par,     &
     &           npma, pma, mwtir, mwtsn, wtir, snoise, xpw, ypw, acxpw,&
     &           acypw, ccpw)
      integer    nobs, iprint, npar, npma, mwtir, mwtsn
      real       x(*), y(*), par(*), pma(*), wtir(0:*), snoise(*),      &
     &           xpw(*), ypw(*), acxpw(0:*), acypw(0:*), ccpw(-mwtir:*)
      end

      interface to subroutine tfpe (iprint, nplhs, nprhs, npnar, npnma, &
     &           ndelay, mwtir, wtir, nsnois, snoise, relerr, maxit,    &
     &           plhs, prhs, pnar, pnma, avar)
      integer    iprint, nplhs, nprhs, npnar, npnma, ndelay, mwtir,     &
     &           nsnois, maxit
      real       relerr, avar, wtir(*), snoise(*), plhs(*), prhs(*),    &
     &           pnar(*), pnma(*)
      end

      interface to subroutine t2pe (iprint, nplhs, nprhs, npnar, npnma, &
     &           ndelay, mwtir, wtir, nsnois, snoise, relerr, maxit,    &
     &           plhs, prhs, pnar, pnma, avar, a, fac, ipvt, wk, acv,   &
     &           parwk, acvmod, tauini, tau, fvec, fjac, r, qtf, wknln, &
     &           h)
      integer    iprint, nplhs, nprhs, npnar, npnma, ndelay, mwtir,     &
     &           nsnois, maxit, ipvt(*)
      real       relerr, avar, wtir(0:*), snoise(*), plhs(*), prhs(0:*),&
     &           pnar(*), pnma(*), a(nplhs,*), fac(*), wk(*), acv(*),   &
     &           parwk(*), acvmod(*), tauini(*), tau(*), fvec(*),       &
     &           fjac(*), r(*), qtf(*), wknln(*), h(*)
      end

      interface to subroutine mlse (nobsx, nchanx, x, ldx, imean, xmean,&
     &           ndiff, ndpreg, lag, const, npreg, preg)
      integer    nobsx, nchanx, ldx, imean, npreg, ndiff(*),            &
     &           ndpreg(*), lag(*)
      real       const, x(*), xmean(*), preg(*)
      end

      interface to subroutine m2se (nobsx, nchanx, x, ldx, imean, xmean,&
     &           ndiff, ndpreg, lag, const, npreg, preg, xwk, iwk)
      integer    nobsx, nchanx, ldx, imean, npreg, ndiff(*),            &
     &           ndpreg(*), lag(*), iwk(*)
      real       const, x(ldx,*), xmean(*), preg(*), xwk(*)
      end

      interface to subroutine mwfe (nchx, mlfil, cxx, ldcxx, mdcxx,     &
     &           nchz, czx, ldczx, mdczx, eps, trace, lfil, fil, ldfil, &
     &           mdfil, enms)
      integer    nchx, mlfil, ldcxx, mdcxx, nchz, ldczx, mdczx, lfil,   &
     &           ldfil, mdfil
      real       eps, trace, cxx(*), czx(*), fil(*), enms(*)
      end

      interface to subroutine m2fe (nchx, mlfil, cxx, ldcxx, mdcxx,     &
     &           nchz, czx, ldczx, mdczx, eps, trace, lfil, fil, ldfil, &
     &           mdfil, enms, iwk, wk)
      integer    nchx, mlfil, ldcxx, mdcxx, nchz, ldczx, mdczx, lfil,   &
     &           ldfil, mdfil, iwk(*)
      real       eps, trace, cxx(ldcxx,mdcxx,*), czx(ldczx,mdczx,*),    &
     &           fil(ldfil,mdfil,*), enms(*), wk(*)
      end

      interface to subroutine kalmn (ny, y, nb, z, ldz, r, ldr, it, t,  &
     &           ldt, iq, q, ldq, tol, b, covb, ldcovb, n, ss, alndet,  &
     &           v, covv, ldcovv)
      integer    ny, nb, ldz, ldr, it, ldt, iq, ldq, ldcovb, n, ldcovv
      real       tol, ss, alndet, y(*), z(*), r(*), t(*), q(*), b(*),   &
     &           covb(*), v(*), covv(*)
      end

      interface to subroutine k2lmn (ny, y, nb, z, ldz, r, ldr, it, t,  &
     &           ldt, iq, q, ldq, tol, b, covb, ldcovb, n, ss, alndet,  &
     &           v, covv, ldcovv, covvch, wk1, wk2)
      integer    ny, nb, ldz, ldr, it, ldt, iq, ldq, ldcovb, n, ldcovv
      real       tol, ss, alndet, y(*), z(ldz,*), r(ldr,*), t(ldt,*),   &
     &           q(ldq,*), b(*), covb(ldcovb,*), v(*), covv(ldcovv,*),  &
     &           covvch(*), wk1(nb,*), wk2(*)
      end

      interface to subroutine lofcf (nobs, lagmin, lagmax, cf, npfree,  &
     &           q, pvalue)
      integer    nobs, lagmin, lagmax, npfree
      real       q, pvalue, cf(*)
      end

      interface to real function diric (m, rangle, eps)
      integer    m
      real       rangle, eps
      end

      interface to real function fejer (m, rangle, eps)
      integer    m
      real       rangle, eps
      end

      interface to subroutine pfft (nobs, x, iprint, xcntr, npad,       &
     &           ifscal, ipver, pm, ldpm)
      integer    nobs, iprint, npad, ifscal, ipver, ldpm
      real       xcntr, x(*), pm(*)
      end

      interface to subroutine p2ft (nobs, x, iprint, xcntr, npad,       &
     &           ifscal, ipver, pm, ldpm, cx, coef, wfftc, cpy)
      integer    nobs, iprint, npad, ifscal, ipver, ldpm
      real       xcntr, x(*), pm(ldpm,*), wfftc(*), cpy(*)
      complex    cx(*), coef(0:*)
      end

      interface to subroutine sswd (nobs, x, iprint, xcntr, npad,       &
     &           ifscal, nf, f, tint, iswver, nm, m, pm, ldpm, sm, ldsm)
      integer    nobs, iprint, npad, ifscal, nf, iswver, nm, ldpm,      &
     &           ldsm, m(*)
      real       xcntr, tint, x(*), f(*), pm(*), sm(*)
      end

      interface to subroutine s2wd (nobs, x, iprint, xcntr, npad,       &
     &           ifscal, nf, f, tint, iswver, nm, m, pm, ldpm, sm, ldsm,&
     &           cx, coef, wfftc, cpy)
      integer    nobs, iprint, npad, ifscal, nf, iswver, nm, ldpm,      &
     &           ldsm, m(*)
      real       xcntr, tint, x(*), f(*), pm(ldpm,*), sm(ldsm,*),       &
     &           wfftc(*), cpy(*)
      complex    cx(*), coef(*)
      end

      interface to subroutine sswp (n, px, nf, f, iswver, m, sx)
      integer    n, nf, iswver, m
      real       px(*), f(*), sx(*)
      end

      interface to subroutine swed (nobs, x, iprint, xcntr, npad,       &
     &           ifscal, nf, f, tint, nwt, wt, pm, ldpm, sm, ldsm)
      integer    nobs, iprint, npad, ifscal, nf, nwt, ldpm, ldsm
      real       xcntr, tint, x(*), f(*), wt(*), pm(*), sm(*)
      end

      interface to subroutine s2ed (nobs, x, iprint, xcntr, npad,       &
     &           ifscal, nf, f, tint, nwt, wt, pm, ldpm, sm, ldsm, cx,  &
     &           coef, wfftc, cpy)
      integer    nobs, iprint, npad, ifscal, nf, nwt, ldpm, ldsm
      real       xcntr, tint, x(*), f(*), wt(-nwt/2:*),                 &
     &           pm(0:ldpm-1,*), sm(ldsm,*), wfftc(*), cpy(*)
      complex    cx(*), coef(*)
      end

      interface to subroutine swep (n, px, nf, f, nwt, wt, sx)
      integer    n, nf, nwt
      real       px(0:*), f(*), wt(-nwt/2:*), sx(*)
      end

      interface to subroutine cpfft (nobs, x, y, iprint, xcntr, ycntr,  &
     &           npad, ifscal, ipver, cpm, ldcpm)
      integer    nobs, iprint, npad, ifscal, ipver, ldcpm
      real       xcntr, ycntr, x(*), y(*), cpm(*)
      end

      interface to subroutine c2fft (nobs, x, y, iprint, xcntr, ycntr,  &
     &           npad, ifscal, ipver, cpm, ldcpm, cx, coef, wfftc, cpy)
      integer    nobs, iprint, npad, ifscal, ipver, ldcpm
      real       xcntr, ycntr, x(*), y(*), cpm(ldcpm,*), wfftc(*),      &
     &           cpy(*)
      complex    cx(*), coef(*)
      end

      interface to subroutine csswd (nobs, x, y, iprint, xcntr, ycntr,  &
     &           npad, ifscal, nf, f, tint, iswver, nm, m, cpm, ldcpm,  &
     &           csm, ldcsm)
      integer    nobs, iprint, npad, ifscal, nf, iswver, nm, ldcpm,     &
     &           ldcsm, m(*)
      real       xcntr, ycntr, tint, x(*), y(*), f(*), cpm(*), csm(*)
      end

      interface to subroutine c2swd (nobs, x, y, iprint, xcntr, ycntr,  &
     &           npad, ifscal, nf, f, tint, iswver, nm, m, cpm, ldcpm,  &
     &           csm, ldcsm, cx, coef, wfftc, cpy)
      integer    nobs, iprint, npad, ifscal, nf, iswver, nm, ldcpm,     &
     &           ldcsm, m(*)
      real       xcntr, ycntr, tint, x(*), y(*), f(*), cpm(ldcpm,10),   &
     &           csm(ldcsm,*), wfftc(*), cpy(*)
      complex    cx(*), coef(*)
      end

      interface to subroutine csswp (n, sx, sy, cpreal, cpimag, nf, f,  &
     &           iswver, m, cospec, quadra, crampl, phase, cohere)
      integer    n, nf, iswver, m
      real       sx(*), sy(*), cpreal(*), cpimag(*), f(*), cospec(*),   &
     &           quadra(*), crampl(*), phase(*), cohere(*)
      end

      interface to subroutine cswed (nobs, x, y, iprint, xcntr, ycntr,  &
     &           npad, ifscal, nf, f, tint, nwt, wt, cpm, ldcpm, csm,   &
     &           ldcsm)
      integer    nobs, iprint, npad, ifscal, nf, nwt, ldcpm, ldcsm
      real       xcntr, ycntr, tint, x(*), y(*), f(*), wt(*), cpm(*),   &
     &           csm(*)
      end

      interface to subroutine c2wed (nobs, x, y, iprint, xcntr, ycntr,  &
     &           npad, ifscal, nf, f, tint, nwt, wt, cpm, ldcpm, csm,   &
     &           ldcsm, cx, coef, wfftc, cpy)
      integer    nobs, iprint, npad, ifscal, nf, nwt, ldcpm, ldcsm
      real       xcntr, ycntr, tint, x(*), y(*), f(*), wt(*),           &
     &           cpm(ldcpm,*), csm(ldcsm,*), wfftc(*), cpy(*)
      complex    cx(*), coef(*)
      end

      interface to subroutine cswep (n, sx, sy, cpreal, cpimag, nf, f,  &
     &           nwt, wt, cospec, quadra, crampl, phase, cohere)
      integer    n, nf, nwt
      real       sx(*), sy(*), cpreal(*), cpimag(*), f(*), wt(*),       &
     &           cospec(*), quadra(*), crampl(*), phase(*), cohere(*)
      end

!
!     Chapter 9:  Covariance Structures and Factor Analysis
!

      interface to subroutine princ (ndf, nvar, cov, ldcov, icov, eval, &
     &           pct, std, evec, ldevec, a, lda)
      integer    ndf, nvar, ldcov, icov, ldevec, lda
      real       cov(ldcov,*), eval(*), pct(*), std(*),                 &
     &           evec(ldevec,*), a(lda,*)
      end

      interface to subroutine kprin (nvar, nmat, cov, ldcov, ani, imeth,&
     &           evec, ldevec)
      integer    nvar, nmat, ldcov, imeth, ldevec
      real       cov(*), ani(*), evec(*)
      end

      interface to subroutine k2rin (nvar, nmat, cov, ldcov, ani, imeth,&
     &           evec, ldevec, h, aux, bold, g, t)
      integer    nvar, nmat, ldcov, imeth, ldevec
      real       cov(ldcov,ldcov,*), ani(*), evec(ldevec,*),            &
     &           h(nvar,nvar,*), aux(nvar,*), bold(*), g(*), t(*)
      end

      interface to subroutine factr (nvar, cov, ldcov, nf, imth, ndf,   &
     &           init, maxit, maxstp, eps, epse, iprint, uniq, a, lda,  &
     &           eval, stat, der)
      integer    nvar, ldcov, nf, imth, ndf, init, maxit, maxstp,       &
     &           iprint, lda
      real       eps, epse, cov(*), uniq(*), a(*), eval(*), stat(*),    &
     &           der(*)
      end

      interface to subroutine f2ctr (nvar, cov, ldcov, nf, imth, ndf,   &
     &           init, maxit, maxstp, eps, epse, iprint, uniq, a, lda,  &
     &           eval, stat, der, is, covi, wk, old, evec, hess)
      integer    nvar, ldcov, nf, imth, ndf, init, maxit, maxstp,       &
     &           iprint, lda, is(*)
      real       eps, epse, cov(ldcov,*), uniq(*), a(lda,*), eval(*),   &
     &           stat(*), der(*), covi(nvar,*), wk(*), old(*),          &
     &           evec(nvar,*), hess(nvar,*)
      end

      interface to subroutine frota (nvar, nf, a, lda, norm, maxit, w,  &
     &           eps, b, ldb, t, ldt)
      integer    nvar, nf, lda, norm, maxit, ldb, ldt
      real       w, eps, a(*), b(*), t(*)
      end

      interface to subroutine f2ota (nvar, nf, a, lda, norm, maxit, w,  &
     &           eps, b, ldb, t, ldt, work)
      integer    nvar, nf, lda, norm, maxit, ldb, ldt
      real       w, eps, a(lda,*), b(ldb,*), t(ldt,*), work(*)
      end

      interface to subroutine fopcs (nvar, nf, a, lda, x, ldx, b, ldb,  &
     &           t, ldt)
      integer    nvar, nf, lda, ldx, ldb, ldt
      real       a(*), x(*), b(*), t(*)
      end

      interface to subroutine f2pcs (nvar, nf, a, lda, x, ldx, b, ldb,  &
     &           t, ldt, wk, s)
      integer    nvar, nf, lda, ldx, ldb, ldt
      real       a(lda,*), x(ldx,*), b(ldb,*), t(ldt,*), wk(*), s(*)
      end

      interface to subroutine fdobl (nvar, nf, a, lda, norm, w, maxit,  &
     &           eps, b, ldb, t, ldt, fcor, ldfcor)
      integer    nvar, nf, lda, norm, maxit, ldb, ldt, ldfcor
      real       w, eps, a(*), b(*), t(*), fcor(*)
      end

      interface to subroutine f2obl (nvar, nf, a, lda, norm, w, maxit,  &
     &           eps, b, ldb, t, ldt, fcor, ldfcor, wk1, wk2, wk3)
      integer    nvar, nf, lda, norm, maxit, ldb, ldt, ldfcor
      real       w, eps, a(lda,*), b(ldb,*), t(ldt,*), fcor(ldfcor,*),  &
     &           wk1(*), wk2(*), wk3(*)
      end

      interface to subroutine fprmx (nvar, nf, a, lda, imth, norm, w,   &
     &           maxit, eps, f, x, ldx, b, ldb, t, ldt, fcor, ldfcor)
      integer    nvar, nf, lda, imth, norm, maxit, ldx, ldb, ldt,       &
     &           ldfcor
      real       w, eps, a(*), f(*), x(*), b(*), t(*), fcor(*)
      end

      interface to subroutine f2rmx (nvar, nf, a, lda, imth, norm, w,   &
     &           maxit, eps, f, x, ldx, b, ldb, t, ldt, fcor, ldfcor,   &
     &           qr, qraux, ipvt, work)
      integer    nvar, nf, lda, imth, norm, maxit, ldx, ldb, ldt,       &
     &           ldfcor, ipvt(*)
      real       w, eps, a(lda,*), f(*), x(ldx,*), b(ldb,*), t(ldt,*),  &
     &           fcor(ldfcor,*), qr(nvar,*), qraux(*), work(*)
      end

      interface to subroutine fharr (nvar, nf, a, lda, norm, maxit, w,  &
     &           c, eps, scale, b, ldb, t, ldt, fcor, ldfcor)
      integer    nvar, nf, lda, norm, maxit, ldb, ldt, ldfcor
      real       w, c, eps, a(*), scale(*), b(*), t(*), fcor(*)
      end

      interface to subroutine f2arr (nvar, nf, a, lda, norm, maxit, w,  &
     &           c, eps, scale, b, ldb, t, ldt, fcor, ldfcor, wk1, wk2)
      integer    nvar, nf, lda, norm, maxit, ldb, ldt, ldfcor
      real       w, c, eps, a(lda,*), scale(*), b(ldb,*), t(ldt,*),     &
     &           fcor(ldfcor,*), wk1(*), wk2(*)
      end

      interface to subroutine fgcrf (nvar, nf, a, lda, norm, w, maxit,  &
     &           eps, b, ldb, t, ldt, fcor, ldfcor)
      integer    nvar, nf, lda, norm, maxit, ldb, ldt, ldfcor
      real       eps, a(*), w(*), b(*), t(*), fcor(*)
      end

      interface to subroutine f2crf (nvar, nf, a, lda, norm, w, maxit,  &
     &           eps, b, ldb, t, ldt, fcor, ldfcor, wk1, wk2, wk3)
      integer    nvar, nf, lda, norm, maxit, ldb, ldt, ldfcor
      real       eps, a(lda,*), w(*), b(ldb,*), t(ldt,*),               &
     &           fcor(ldfcor,*), wk1(*), wk2(nvar,*), wk3(nf,*)
      end

      interface to subroutine fimag (nf, t, ldt, ti, ldti)
      integer    nf, ldt, ldti
      real       t(*), ti(*)
      end

      interface to subroutine f2mag (nf, t, ldt, ti, ldti, rwk, iwk)
      integer    nf, ldt, ldti, iwk(*)
      real       t(ldt,*), ti(ldti,*), rwk(*)
      end

      interface to subroutine frvar (nvar, nf, a, lda, t, ldt, var, s,  &
     &           lds, fvar)
      integer    nvar, nf, lda, ldt, lds
      real       a(lda,*), t(ldt,*), var(*), s(lds,*), fvar(*)
      end

      interface to subroutine f2var (nvar, nf, a, lda, t, ldt, var, s,  &
     &           lds, fvar, tinv, wkinv, iwkinv)
      integer    nvar, nf, lda, ldt, lds, iwkinv(*)
      real       a(lda,*), t(ldt,*), var(*), s(lds,*), fvar(*),         &
     &           tinv(ldt,*), wkinv(*)
      end

      interface to subroutine fcoef (nvar, nf, a, lda, imth, cov, ldcov,&
     &           t, ldt, scoef, ldscoe)
      integer    nvar, nf, lda, imth, ldcov, ldt, ldscoe
      real       a(*), cov(*), t(*), scoef(*)
      end

      interface to subroutine f2oef (nvar, nf, a, lda, imth, cov, ldcov,&
     &           t, ldt, scoef, ldscoe, b, rwk1, s, uniq, rwk2)
      integer    nvar, nf, lda, imth, ldcov, ldt, ldscoe
      real       a(lda,*), cov(ldcov,*), t(ldt,*), scoef(ldscoe,*),     &
     &           b(*), rwk1(*), s(*), uniq(*), rwk2(*)
      end

      interface to subroutine fscor (nvar, nf, scoef, ldscoe, nobs, x,  &
     &           ldx, xbar, std, scor, ldscor)
      integer    nvar, nf, ldscoe, nobs, ldx, ldscor
      real       scoef(ldscoe,*), x(ldx,*), xbar(*), std(*),            &
     &           scor(ldscor,*)
      end

      interface to subroutine f2cor (nvar, nf, scoef, ldscoe, nobs, x,  &
     &           ldx, xbar, std, scor, ldscor, wk)
      integer    nvar, nf, ldscoe, nobs, ldx, ldscor
      real       scoef(ldscoe,*), x(ldx,*), xbar(*), std(*),            &
     &           scor(ldscor,*), wk(*)
      end

      interface to subroutine fresi (nvar, cov, ldcov, nf, a, lda, y,   &
     &           resid, ldresi)
      integer    nvar, ldcov, nf, lda, ldresi
      real       cov(ldcov,*), a(lda,*), y(*), resid(ldresi,*)
      end

      interface to subroutine mvind (ndf, nvar, cov, ldcov, ngroup,     &
     &           nvset, stat)
      integer    ndf, nvar, ldcov, ngroup, nvset(*)
      real       cov(*), stat(*)
      end

      interface to subroutine m2ind (ndf, nvar, cov, ldcov, ngroup,     &
     &           nvset, stat, fac, wk, ipvt)
      integer    ndf, nvar, ldcov, ngroup, nvset(*), ipvt(*)
      real       cov(ldcov,*), stat(*), fac(nvar,*), wk(*)
      end

      interface to subroutine cancr (nobs, nvar1, nvar2, ncol, x, ldx,  &
     &           ifrq, iwt, ind1, ind2, tol, iprint, xx, ldxx, corr,    &
     &           ldcorr, coef1, ldcof1, coef2, ldcof2, coefr1, ldcfr1,  &
     &           coefr2, ldcfr2, stat, ldstat)
      integer    nobs, nvar1, nvar2, ncol, ldx, ifrq, iwt, iprint,      &
     &           ldxx, ldcorr, ldcof1, ldcof2, ldcfr1, ldcfr2, ldstat,  &
     &           ind1(*), ind2(*)
      real       tol, x(*), xx(*), corr(*), coef1(*), coef2(*),         &
     &           coefr1(*), coefr2(*), stat(*)
      end

      interface to subroutine c2ncr (nobs, nvar1, nvar2, ncol, x, ldx,  &
     &           ifrq, iwt, ind1, ind2, tol, iprint, xx, ldxx, corr,    &
     &           ldcorr, coef1, ldcof1, coef2, ldcof2, coefr1, ldcfr1,  &
     &           coefr2, ldcfr2, stat, ldstat, r, s, ind, work, wka, wk)
      integer    nobs, nvar1, nvar2, ncol, ldx, ifrq, iwt, iprint,      &
     &           ldxx, ldcorr, ldcof1, ldcof2, ldcfr1, ldcfr2, ldstat,  &
     &           ind1(*), ind2(*), ind(*)
      real       tol, x(ldx,*), xx(ldxx,*), corr(ldcorr,*),             &
     &           coef1(ldcof1,*), coef2(ldcof2,*), coefr1(ldcfr1,*),    &
     &           coefr2(ldcfr2,*), stat(ldstat,*), r(*), s(*),          &
     &           work(*), wka(*), wk(*)
      end

      interface to subroutine canvc (ndf, nvar1, nvar2, cov, ldcov,     &
     &           ind1, ind2, iprint, corr, ldcorr, coef1, ldcof1, coef2,&
     &           ldcof2, coefr1, ldcfr1, coefr2, ldcfr2)
      integer    ndf, nvar1, nvar2, ldcov, iprint, ldcorr, ldcof1,      &
     &           ldcof2, ldcfr1, ldcfr2, ind1(*), ind2(*)
      real       cov(*), corr(*), coef1(*), coef2(*), coefr1(*),        &
     &           coefr2(*)
      end

      interface to subroutine c2nvc (ndf, nvar1, nvar2, cov, ldcov,     &
     &           ind1, ind2, iprint, corr, ldcorr, coef1, ldcof1, coef2,&
     &           ldcof2, coefr1, ldcfr1, coefr2, ldcfr2, r, s, std1,    &
     &           std2, wka, wk)
      integer    ndf, nvar1, nvar2, ldcov, iprint, ldcorr, ldcof1,      &
     &           ldcof2, ldcfr1, ldcfr2, ind1(*), ind2(*)
      real       cov(*), corr(*), coef1(*), coef2(*), coefr1(*),        &
     &           coefr2(*), r(*), s(*), std1(*), std2(*), wka(*), wk(*)
      end

!
!     Chapter 10:  Discriminant Analysis
!

      interface to subroutine dscrm (ido, nrow, nvar, ncol, x, ldx, ind,&
     &           ifrq, iwt, igrp, ngroup, imth, iprint, prior, ni,      &
     &           xmean, ldxmea, cov, ldcov, coef, ldcoef, iclass, prob, &
     &           ldprob, class, ldclas, d2, ldd2, stat, nrmiss)
      integer    ido, nrow, nvar, ncol, ldx, ifrq, iwt, igrp, ngroup,   &
     &           imth, iprint, ldxmea, ldcov, ldcoef, ldprob, ldclas,   &
     &           ldd2, nrmiss, ind(*), ni(*), iclass(*)
      real       x(ldx,*), prior(*), xmean(ldxmea,*),                   &
     &           cov(ldcov,ldcov,*), coef(ldcoef,*), prob(ldprob,*),    &
     &           class(ldclas,*), d2(ldd2,*), stat(*)
      end

      interface to subroutine d2crm (ido, nrow, nvar, ncol, x, ldx, ind,&
     &           ifrq, iwt, igrp, ngroup, imth, iprint, prior, ni,      &
     &           xmean, ldxmea, cov, ldcov, coef, ldcoef, iclass, prob, &
     &           ldprob, class, ldclas, d2, ldd2, stat, nrmiss, d, ob,  &
     &           ob1)
      integer    ido, nrow, nvar, ncol, ldx, ifrq, iwt, igrp, ngroup,   &
     &           imth, iprint, ldxmea, ldcov, ldcoef, ldprob, ldclas,   &
     &           ldd2, nrmiss, ind(*), ni(*), iclass(*)
      real       x(ldx,*), prior(*), xmean(ldxmea,*),                   &
     &           cov(ldcov,ldcov,*), coef(ldcoef,*), prob(ldprob,*),    &
     &           class(ldclas,*), d2(ldd2,*), stat(*), d(nvar,*),       &
     &           ob(*), ob1(*)
      end

      interface to subroutine dmscr (ngroup, nvar, xmean, ldxmea, sumwt,&
     &           cov, ldcov, nnv, eval, coef, ldcoef, cmean, ldcmea)
      integer    ngroup, nvar, ldxmea, ldcov, nnv, ldcoef, ldcmea
      real       xmean(*), sumwt(*), cov(*), eval(*), coef(*), cmean(*)
      end

      interface to subroutine d2scr (ngroup, nvar, xmean, ldxmea, sumwt,&
     &           cov, ldcov, nnv, eval, coef, ldcoef, cmean, ldcmea,    &
     &           bcov, eval2, evec, wkr, wk)
      integer    ngroup, nvar, ldxmea, ldcov, nnv, ldcoef, ldcmea
      real       xmean(ldxmea,*), sumwt(*), cov(ldcov,*), eval(*),      &
     &           coef(ldcoef,*), cmean(ldcmea,*), bcov(nvar,*),         &
     &           eval2(*), evec(nvar,*), wkr(*), wk(*)
      end

      interface to subroutine nnbrd (nrow, nvar, ncol, x, ldx, k, ind,  &
     &           igrp, ngroup, nrule, nclass, metric, prior, thresh,    &
     &           part, idiscr, ni, iclass, prob, ldprob, class, ldclas)
      integer    nrow, nvar, ncol, ldx, k, igrp, ngroup, nrule,         &
     &           nclass, metric, ldprob, ldclas, ind(*), idiscr(*),     &
     &           ni(*), iclass(*)
      real       thresh, x(*), prior(*), part(*), prob(*), class(*)
      end

      interface to subroutine n2brd (nrow, nvar, ncol, x, ldx, k, ind,  &
     &           igrp, ngroup, nrule, nclass, metric, prior, thresh,    &
     &           part, idiscr, ni, iclass, prob, ldprob, class, ldclas, &
     &           wk, iwk, ilow, ihigh, iside, bndl, bndh, xkey, ipqr,   &
     &           pqd)
      integer    nrow, nvar, ncol, ldx, k, igrp, ngroup, nrule,         &
     &           nclass, metric, ldprob, ldclas, ind(*), idiscr(*),     &
     &           ni(*), iclass(*), iwk(*), ilow(*), ihigh(*),           &
     &           iside(*), ipqr(*)
      real       thresh, x(ldx,*), prior(*), part(*), prob(ldprob,*),   &
     &           class(ldclas,*), wk(*), bndl(nvar,*), bndh(nvar,*),    &
     &           xkey(*), pqd(*)
      end

!
!     Chapter 11:  Cluster Analysis
!

      interface to subroutine cdist (nrow, ncol, x, ldx, ndstm, ind,    &
     &           imeth, irow, iscale, dist, lddist)
      integer    nrow, ncol, ldx, ndstm, imeth, irow, iscale, lddist,   &
     &           ind(*)
      real       x(*), dist(*)
      end

      interface to subroutine c2ist (nrow, ncol, x, ldx, ndstm, ind,    &
     &           imeth, irow, iscale, dist, lddist, x1, x2, scale, wk,  &
     &           ind1)
      integer    nrow, ncol, ldx, ndstm, imeth, irow, iscale, lddist,   &
     &           ind(*), ind1(*)
      real       x(ldx,*), dist(lddist,*), x1(*), x2(*), scale(*),      &
     &           wk(ndstm,*)
      end

      interface to subroutine clink (npt, imeth, idist, dist, lddist,   &
     &           clevel, iclson, icrson)
      integer    npt, imeth, idist, lddist, iclson(*), icrson(*)
      real       dist(*), clevel(*)
      end

      interface to subroutine c2ink (npt, imeth, idist, dist, lddist,   &
     &           clevel, iclson, icrson, iptr, iclus, cwt, csum)
      integer    npt, imeth, idist, lddist, iclson(*), icrson(*),       &
     &           iptr(*), iclus(*)
      real       dist(lddist,*), clevel(*), cwt(*), csum(*)
      end

      interface to subroutine kmean (nobs, ncol, nvar, x, ldx, ifrq,    &
     &           iwt, ind, k, maxit, cm, ldcm, swt, ldswt, ic, nc, wss)
      integer    nobs, ncol, nvar, ldx, ifrq, iwt, k, maxit, ldcm,      &
     &           ldswt, ind(*), ic(*), nc(*)
      real       x(*), cm(*), swt(*), wss(*)
      end

      interface to subroutine k2ean (nobs, ncol, nvar, x, ldx, ifrq,    &
     &           iwt, ind, k, maxit, cm, ldcm, swt, ldswt, ic1, nc, wss,&
     &           ic2, ncp, d, itran, live)
      integer    nobs, ncol, nvar, ldx, ifrq, iwt, k, maxit, ldcm,      &
     &           ldswt, ind(*), ic1(*), nc(*), ic2(*), ncp(*),          &
     &           itran(*), live(*)
      real       x(ldx,*), cm(ldcm,*), swt(ldswt,*), wss(*), d(*)
      end

$IF .NOT. DEFINED (IMSL_STAT_COMMON)

      interface to subroutine cnumb (node, iclson, icrson, k, iclus,    &
     &           nclus)
      integer    node, k, iclson(*), icrson(*), iclus(*), nclus(*)
      end

      interface to subroutine c2umb (node, iclson, icrson, k, iclus,    &
     &           nclus, ipt)
      integer    node, iclson(*), icrson(*), k, iclus(*), nclus(*),     &
     &           ipt(*)
      end

$ENDIF

!
!     Chapter 12:  Sampling
!

      interface to subroutine smppr (nint, nsamp, npop, conper, stat)
      integer    nint, nsamp, npop
      real       conper, stat(*)
      end

      interface to subroutine smpps (nstrat, nints, nsamps, npops,      &
     &           conper, propor, stat)
      integer    nstrat, nints(*), nsamps(*), npops(*)
      real       conper, propor(*), stat(*)
      end

      interface to subroutine smprr (ido, nrow, x, y, npop, iopt, xmean,&
     &           r1oef, conper, stat)
      integer    ido, nrow, npop, iopt
      real       xmean, r1oef, conper, x(*), y(*), stat(*)
      end

      interface to subroutine smprs (ido, nstrat, nrows, x, y, npops,   &
     &           iopt, itopt, xmeans, conper, coefs, xbars, xvars, xcvs,&
     &           ybars, yvars, ycvs, xycovs, nsamps, stat)
      integer    ido, nstrat, iopt, itopt, nrows(*), npops(*),          &
     &           nsamps(*)
      real       conper, x(*), y(*), xmeans(*), coefs(*), xbars(*),     &
     &           xvars(*), xcvs(*), ybars(*), yvars(*), ycvs(*),        &
     &           xycovs(*), stat(*)
      end

      interface to subroutine smpsc (ido, nclstr, nrows, y, iopt,       &
     &           nclpop, npop, size, tsize, conper, clmean, clvar,      &
     &           nsamps, stat)
      integer    ido, nclstr, iopt, nclpop, npop, nrows(*), nsamps(*)
      real       tsize, conper, y(*), size(*), clmean(*), clvar(*),     &
     &           stat(*)
      end

      interface to subroutine smpsr (ido, nrow, y, npop, iopt, nsampo,  &
     &           conper, stat)
      integer    ido, nrow, npop, iopt, nsampo
      real       conper, y(*), stat(*)
      end

      interface to subroutine smpss (ido, nstrat, nrows, y, npops,      &
     &           ivopt, conper, ybars, yvars, nsamps, stat)
      integer    ido, nstrat, ivopt, nrows(*), npops(*), nsamps(*)
      real       conper, y(*), ybars(*), yvars(*), stat(*)
      end

      interface to subroutine smpst (ido, nunsam, nelsam, nobs, y,      &
     &           nunpop, nelpop, conper, pumean, puvar, stat)
      integer    ido, nunsam, nelsam, nobs, nunpop, nelpop
      real       conper, y(*), pumean(*), puvar(*), stat(*)
      end

!
!     Chapter 13:  Survival Analysis, Life Testing and Reliability
!

      interface to subroutine kapmr (nobs, ncol, x, ldx, irt, ifrq,     &
     &           icen, igrp, isrt, sprob, ldspro, nrmiss)
      integer    nobs, ncol, ldx, irt, ifrq, icen, igrp, isrt, ldspro,  &
     &           nrmiss
      real       x(ldx,*), sprob(ldspro,2)
      end

      interface to subroutine k2pmr (nobs, ncol, x, ldx, irt, ifrq,     &
     &           icen, igrp, isrt, sprob, ldspro, nrmiss, igp, iperm,   &
     &           inddr, iwk, wk, iper)
      integer    nobs, ncol, ldx, irt, ifrq, icen, igrp, isrt, ldspro,  &
     &           nrmiss, igp(*), iperm(*), inddr(*), iwk(*), iper(*)
      real       x(ldx,*), sprob(ldspro,2), wk(*)
      end

      interface to subroutine ktble (nobs, ncol, x, ldx, irt, ifrq,     &
     &           icen, igrp, isrt, sprob, ldspro)
      integer    nobs, ncol, ldx, irt, ifrq, icen, igrp, isrt, ldspro
      real       x(*), sprob(*)
      end

      interface to subroutine k2ble (nobs, ncol, x, ldx, irt, ifrq,     &
     &           icen, igrp, isrt, sprob, ldspro, algl, iperm, inddr,   &
     &           wk, wk1, iwk)
      integer    nobs, ncol, ldx, irt, ifrq, icen, igrp, isrt, ldspro,  &
     &           iperm(*), inddr(*), iwk(*)
      real       x(ldx,*), sprob(ldspro,*), algl(*), wk(*), wk1(*)
      end

      interface to subroutine trnbl (nobs, ncol, x, ldx, ilt, irt, ifrq,&
     &           icen, maxit, eps, iprint, nintvl, sprob, ldspro, algl, &
     &           nrmiss)
      integer    nobs, ncol, ldx, ilt, irt, ifrq, icen, maxit, iprint,  &
     &           nintvl, ldspro, nrmiss
      real       eps, algl, x(*), sprob(*)
      end

      interface to subroutine t2nbl (nobs, ncol, x, ldx, ilt, irt, ifrq,&
     &           icen, maxit, eps, iprint, nintvl, sprob, ldspro, algl, &
     &           nrmiss, wk, iperm, inddr, wwk, iwk)
      integer    nobs, ncol, ldx, ilt, irt, ifrq, icen, maxit, iprint,  &
     &           nintvl, ldspro, nrmiss, iperm(*), inddr(*), iwk(*)
      real       eps, algl, x(ldx,*), sprob(ldspro,*), wk(nobs,*),      &
     &           wwk(*)
      end

      interface to subroutine phglm (nrow, ncol, x, ldx, irt, ifrq,     &
     &           ifix, icen, istrat, maxit, eps, ratio, nclvar, indcl,  &
     &           nef, nvef, indef, init, itie, iprint, maxcl, nclval,   &
     &           clval, ncoef, coef, ldcoef, algl, cov, ldcov, xmean,   &
     &           case, ldcase, gr, igrp, nrmiss)
      integer    nrow, ncol, ldx, irt, ifrq, ifix, icen, istrat,        &
     &           maxit, nclvar, nef, init, itie, iprint, maxcl, ncoef,  &
     &           ldcoef, ldcov, ldcase, nrmiss, indcl(*), nvef(*),      &
     &           indef(*), nclval(*), igrp(*)
      real       eps, ratio, algl, x(*), clval(*), coef(*), cov(*),     &
     &           xmean(*), case(*), gr(*)
      end

      interface to subroutine p2glm (nrow, ncol, x, ldx, irt, ifrq,     &
     &           ifix, icen, istrat, maxit, eps, ratio, nclvar, indcl,  &
     &           nef, nvef, indef, init, itie, iprint, maxcl, nclval,   &
     &           clval, ncoef, coef, ldcoef, algl, cov, ldcov, xmean,   &
     &           case, ldcase, gr, igrp, nrmiss, obs, smg, smh, iptr,   &
     &           idt, iwk)
      integer    nrow, ncol, ldx, irt, ifrq, ifix, icen, istrat,        &
     &           maxit, nclvar, nef, init, itie, iprint, maxcl, ncoef,  &
     &           ldcoef, ldcov, ldcase, nrmiss, indcl(*), nvef(*),      &
     &           indef(*), nclval(*), igrp(*), iptr(*), idt(*), iwk(*)
      real       eps, ratio, algl, x(*), clval(*), coef(*), cov(*),     &
     &           xmean(*), case(*), gr(*), obs(*), smg(*), smh(*)
      end

      interface to subroutine svglm (nobs, ncol, x, ldx, model, ilt,    &
     &           irt, ifrq, ifix, icen, infin, maxit, eps, intcep,      &
     &           nclvar, indcl, nef, nvef, indef, init, iprint, maxcl,  &
     &           nclval, clval, ncoef, coef, ldcoef, algl, cov, ldcov,  &
     &           xmean, case, ldcase, gr, iadd, nrmiss)
      integer    nobs, ncol, ldx, model, ilt, irt, ifrq, ifix, icen,    &
     &           infin, maxit, intcep, nclvar, nef, init, iprint,       &
     &           maxcl, ncoef, ldcoef, ldcov, ldcase, nrmiss,           &
     &           indcl(*), nvef(*), indef(*), nclval(*), iadd(*)
      real       eps, algl, x(*), clval(*), coef(*), cov(*), xmean(*),  &
     &           case(*), gr(*)
      end

      interface to subroutine s2glm (nobs, ncol, x, ldx, model, ilt,    &
     &           irt, ifrq, ifix, icen, infin, maxit, eps, intcep,      &
     &           nclvar, indcl, nef, nvef, indef, init, iprint, maxcl,  &
     &           nclval, clval, ncoef, coef, ldcoef, algl, cov, ldcov,  &
     &           xmean, case, ldcase, gr, iadd, nrmiss, nmax, obs, add, &
     &           xd, wk, kbasis, rwk, iwk)
      integer    nobs, ncol, ldx, model, ilt, irt, ifrq, ifix, icen,    &
     &           infin, maxit, intcep, nclvar, nef, init, iprint,       &
     &           maxcl, ncoef, ldcoef, ldcov, ldcase, nrmiss, nmax,     &
     &           indcl(*), nvef(*), indef(*), nclval(*), iadd(*),       &
     &           kbasis(*), iwk(*)
      real       eps, algl, x(*), clval(*), coef(ldcoef,*),             &
     &           cov(ldcov,*), xmean(*), case(ldcase,*), gr(*),         &
     &           obs(*), xd(*), wk(*), rwk(*)
      logical    add(*)
      end

      interface to subroutine stble (nrow, ncol, xpt, ldxpt, model,     &
     &           time, npt, delta, ifix, intcep, nclvar, indcl, nclval, &
     &           clval, nef, nvef, indef, ncoef, coef, iprint, sprob,   &
     &           ldspro, xbeta)
      integer    nrow, ncol, ldxpt, model, npt, ifix, intcep, nclvar,   &
     &           nef, ncoef, iprint, ldspro, indcl(*), nclval(*),       &
     &           nvef(*), indef(*)
      real       time, delta, xpt(*), clval(*), coef(*), sprob(*),      &
     &           xbeta(*)
      end

      interface to subroutine s2ble (nrow, ncol, xpt, ldxpt, model,     &
     &           time, npt, delta, ifix, intcep, nclvar, indcl, nclval, &
     &           clval, nef, nvef, indef, ncoef, coef, iprint, sprob,   &
     &           ldspro, xbeta, chwk, obs, vector)
      integer    nrow, ncol, ldxpt, model, npt, ifix, intcep, nclvar,   &
     &           nef, ncoef, iprint, ldspro, indcl(*), nclval(*),       &
     &           nvef(*), indef(*)
      real       time, delta, xpt(ldxpt,*), clval(*), coef(*),          &
     &           sprob(ldspro,*), xbeta(*), obs(*), vector(1,*)
      character  chwk(*)*10
      end

      interface to subroutine actbl (imth, n, npop, age, a, ipop, idth, &
     &           iprint, table, ldtabl)
      integer    imth, n, npop, iprint, ldtabl, ipop(*), idth(*)
      real       age(*), a(*), table(ldtabl,*)
      end

!
!     Chapter 14:  Multidimensional Scaling
!

      interface to subroutine msidv (nstim, nsub, x, icnvt, model,      &
     &           istrs, itrans, ndim, iprint, dist, cfl, ldcfl, w, ldw, &
     &           a, b, wt, strs, strss, resid)
      integer    nstim, nsub, icnvt, model, istrs, itrans, ndim,        &
     &           iprint, ldcfl, ldw
      real       strss, x(*), dist(*), cfl(*), w(*), a(*), b(*),        &
     &           wt(*), strs(*), resid(*)
      end

      interface to subroutine m2idv (nstim, nsub, x, icnvt, model,      &
     &           istrs, itrans, ndim, iprint, dist, cfl, ldcfl, w, ldw, &
     &           a, b, wt, strs, strss, resid, wk1, wk2, wk3, wk4, wk5, &
     &           wk6, wk7, iwk8, wk10, wk11, wk12, wk13, id, wkder,     &
     &           dwkhes, dwkgra, wkddp, ncom, disp)
      integer    nstim, nsub, icnvt, model, istrs, itrans, ndim,        &
     &           iprint, ldcfl, ldw, iwk8, id(*), ncom(*)
      real       strss, x(*), dist(*), cfl(*), w(*), a(*), b(*),        &
     &           wt(*), strs(*), resid(*), wk1(*), wk2(*), wk3(*),      &
     &           wk4(*), wk5(*), wk6(*), wk7(*), wk10(*), wk11(*),      &
     &           wk12(*), wk13(*), wkder(*), wkddp(*), disp(*)
      double precision dwkhes(*), dwkgra(*)
      end

      interface to subroutine msdst (nstim, ndim, cfl, ldcfl, nsub,     &
     &           imod, iform, itrans, w, ldw, ws, ldws, dist)
      integer    nstim, ndim, ldcfl, nsub, iform, itrans, ldw, ldws,    &
     &           imod(3)
      real       cfl(ldcfl,*), w(ldw,*), ws(ldws,*), dist(*)
      end

      interface to subroutine msstn (nrow, ncol, nsub, iform, x, ldx,   &
     &           icnvt, istrat, iscale, ncom, xout)
      integer    nrow, ncol, nsub, iform, ldx, icnvt, istrat, iscale,   &
     &           ncom(*)
      real       x(*), xout(*)
      end

      interface to subroutine m2stn (nrow, ncol, nsub, iform, x, ldx,   &
     &           icnvt, istrat, iscale, ncom, xout, nstim, xx, xmis)
      integer    nrow, ncol, nsub, iform, ldx, icnvt, istrat, iscale,   &
     &           nstim, ncom(*)
      real       x(ldx,*), xout(*), xx(nstim,*), xmis(nstim,*)
      end

      interface to subroutine msdbl (nstim, nsub, iform, x, ldx, iscale,&
     &           disp, lddisp, p, ldp, ds, ldds)
      integer    nstim, nsub, iform, ldx, iscale, lddisp, ldp, ldds
      real       x(ldx,*), disp(lddisp,lddisp,*), p(ldp,ldp,*),         &
     &           ds(ldds,*)
      end

      interface to subroutine msini (nstim, nsub, iform, x, ldx, imod,  &
     &           ndim, cfl, ldcfl, w, ldw, ws, ldws, wmin, wsmin)
      integer    nstim, nsub, iform, ldx, ndim, ldcfl, ldw, ldws,       &
     &           imod(*)
      real       wmin, wsmin, x(*), cfl(*), w(*), ws(*)
      end

      interface to subroutine m2ini (nstim, nsub, iform, x, ldx, imod,  &
     &           ndim, cfl, ldcfl, w, ldw, ws, ldws, wmin, wsmin, tr,   &
     &           xx, disp, ds, ewk1, ewk2, iewk, c)
      integer    nstim, nsub, iform, ldx, ndim, ldcfl, ldw, ldws,       &
     &           imod(*), iewk(*)
      real       wmin, wsmin, x(ldx,*), cfl(ldcfl,*), w(ldw,*),         &
     &           ws(ldws,*), tr(*), xx(*), disp(nstim,nstim,*),         &
     &           ds(nstim,*), ewk1(*), ewk2(*), c(ndim,ndim,*)
      end

      interface to subroutine mstrs (n, dist, disp, intcep, a, islope,  &
     &           b, power, istrs, strss, wt)
      integer    n, intcep, islope, istrs
      real       a, b, power, strss, wt, dist(*), disp(*)
      end

!
!     Chapter 15:  Density and Hazard Estimation
!

      interface to subroutine despl (nobs, x, node, bnds, init, alpha,  &
     &           maxit, eps, dens, stat, nmiss)
      integer    nobs, node, init, maxit, nmiss
      real       alpha, eps, x(*), bnds(*), dens(*), stat(*)
      end

      interface to subroutine d2spl (nobs, x, node, bnds, init, alpha,  &
     &           maxit, eps, dens, stat, nmiss, hess, ldhess, ilohi,    &
     &           denest, b, ipvt, wk2, xwk)
      integer    nobs, node, init, maxit, nmiss, ldhess,                &
     &           ilohi(node,*), ipvt(*)
      real       alpha, eps, x(*), bnds(2), dens(*), stat(*), hess(*),  &
     &           denest(*), b(*), wk2(*), xwk(*)
      end

      interface to subroutine deskn (xker, nobs, x, window, xmax, nxpt, &
     &           xpt, dens, nmiss)
      integer    nobs, nxpt, nmiss
      real       xker, window, xmax, x(*), xpt(*), dens(*)
      external   xker
      end

      interface to subroutine dnfft (nobs, x, freq, bnds, window, ifft, &
     &           nxpt, coef, dens, nrmiss)
      integer    nobs, ifft, nxpt, nrmiss
      real       window, x(*), freq(*), bnds(*), coef(*), dens(*)
      end

      interface to subroutine d2fft (nobs, x, freq, bnds, window, ifft, &
     &           nxpt, coef, dens, nrmiss, wfftr)
      integer    nobs, ifft, nxpt, nrmiss
      real       window, x(*), freq(*), bnds(*), coef(*), dens(*),      &
     &           wfftr(*)
      end

      interface to subroutine despt (node, xpt, iopt, nord, amesh, dens,&
     &           denest)
      integer    node, iopt, nord
      real       xpt(*), amesh(*), dens(*), denest(*)
      end

      interface to subroutine d2spt (node, xpt, iopt, nord, amesh, dens,&
     &           denest, cf, x, break)
      integer    node, iopt, nord
      real       xpt(*), amesh(*), dens(*), denest(*), cf(4,*), x(*),   &
     &           break(*)
      end

      interface to subroutine hazrd (nobs, x, ldx, irt, icen, iwto,     &
     &           ngrid, bstart, ginc, kmin, ink, nk, iprint, isort, st, &
     &           jcen, alpha, beta, k, vml, h, nmiss)
      integer    nobs, ldx, irt, icen, iwto, ngrid, kmin, ink, nk,      &
     &           iprint, isort, k, nmiss, jcen(*)
      real       bstart, ginc, alpha, beta, vml, x(ldx,*), st(*), h(*)
      end

      interface to subroutine hazez (nobs, x, ldx, irt, icen, iprint,   &
     &           st, jcen, alpha, beta, k, vml, h, nmiss)
      integer    nobs, ldx, irt, icen, iprint, k, nmiss, jcen(*)
      real       alpha, beta, vml, x(ldx,*), st(*), h(*)
      end

      interface to subroutine hazst (nobs, st, jcen, iwto, ngrid, gstrt,&
     &           ginc, alpha, beta, k, ihcomp, h, haz)
      integer    nobs, iwto, ngrid, k, ihcomp, jcen(*)
      real       gstrt, ginc, alpha, beta, st(*), h(*), haz(*)
      end

!
!     Chapter 16:  Line Printer Graphics
!

      interface to subroutine vhstp (nbar, frq, isp, title)
      integer    nbar, isp
      real       frq(*)
      character  title*(*)
      end

      interface to subroutine vhs2p (nbar, frqx, frqy, isp, title)
      integer    nbar, isp
      real       frqx(*), frqy(*)
      character  title*(*)
      end

      interface to subroutine v2s2p (nbar, frqx, frqy, isp, title, wk)
      integer    nbar, isp
      real       frqx(*), frqy(*), wk(*)
      character  title*(*)
      end

      interface to subroutine hhstp (nbar, frq, ibeg, ispace, length,   &
     &           irep, iopt, title)
      integer    nbar, ibeg, ispace, length, irep, iopt
      real       frq(*)
      character  title*(*)
      end

      interface to subroutine sctp (nobs, nvar, a, lda, icol, range,    &
     &           symbol, xtitle, ytitle, title)
      integer    nobs, nvar, lda, icol(*)
      real       a(lda,*), range(*)
      character  symbol*(*), xtitle*(*), ytitle*(*), title*(*)
      end

      interface to subroutine boxp (ngroup, ni, x, title)
      integer    ngroup, ni(*)
      real       x(*)
      character  title*(*)
      end

      interface to subroutine b2xp (ngroup, ni, x, title, xi)
      integer    ngroup, ni(*)
      real       x(*), xi(*)
      character  title*(*)
      end

      interface to subroutine stmlp (nobs, x, unit, title)
      integer    nobs
      real       unit, x(*)
      character  title*(*)
      end

      interface to subroutine s2mlp (nobs, x, unit, title, maxwid, iwk, &
     &           xi)
      integer    nobs, maxwid, iwk(maxwid)
      real       unit, x(*), xi(*)
      character  title*(*)
      end

      interface to subroutine cdfp (cdf, nobs, x, n12, n95, iprint)
      integer    nobs, n12, n95, iprint
      real       cdf, x(*)
      external   cdf
      end

      interface to subroutine c2fp (cdf, nobs, x, n12, n95, iprint, wkx,&
     &           wk)
      integer    nobs, n12, n95, iprint
      real       cdf, x(*), wkx(*), wk(nobs,*)
      external   cdf
      end

      interface to subroutine cdf2p (nobs1, nobs2, x)
      integer    nobs1, nobs2
      real       x(*)
      end

      interface to subroutine c2f2p (nobs1, nobs2, x, wk, iwk)
      integer    nobs1, nobs2, iwk(*)
      real       x(*), wk(*)
      end

      interface to subroutine probp (nobs, n1, n2, x, idist)
      integer    nobs, n1, n2, idist
      real       x(*)
      end

      interface to subroutine p2obp (nobs, n1, n2, x, idist, m1, m2, wk)
      integer    nobs, n1, n2, idist, m1, m2
      real       x(*), wk(*)
      end

      interface to subroutine treep (node, iclson, icrson, imeth,       &
     &           clevel, iroot, nscale, nfill, scale, nodenm)
      integer    node, imeth, iroot, nscale, nfill, iclson(*),          &
     &           icrson(*)
      real       clevel(*), scale(2)
      character  nodenm(*)*(*)
      end

      interface to subroutine t2eep (node, iclson, icrson, imeth,       &
     &           clevel, iroot, nscale, nfill, scale, nodenm, idtree,   &
     &           istree, iotree, intree, tltree)
      integer    node, imeth, iroot, nscale, nfill, iclson(*),          &
     &           icrson(*), idtree(*), istree(*), iotree(*), intree(*)
      real       clevel(*), scale(2), tltree(*)
      character  nodenm(*)*(*)
      end

$IF .NOT. DEFINED (IMSL_COMMON_SINGLE)

      interface to subroutine plotp (ndata, nfun, x, a, lda, inc, range,&
     &           symbol, xtitle, ytitle, title)
      integer    ndata, nfun, lda, inc
      real       x(*), a(lda,*), range(4)
      character  symbol*(*), xtitle*(*), ytitle*(*), title*(*)
      end

$ENDIF

!
!     Chapter 17:  Probability Distribution Functions and Inverses
!

      interface to real function csnin (p, df, alam)
      real       p, df, alam
      end

      interface to real function gamin (p, a)
      real       p, a
      end

      interface to real function tnin (p, idf, delta)
      integer    idf
      real       p, delta
      end

      interface to real function gfnin (f, p, eps, guess)
      real       f, p, eps, guess
      external   f
      end

$IF .NOT. DEFINED (IMSL_COMMON_SINGLE)

      interface to real function bindf (k, n, p)
      integer    k, n
      real       p
      end

      interface to real function binpr (k, n, p)
      integer    k, n
      real       p
      end

      interface to real function hypdf (k, n, m, l)
      integer    k, n, m, l
      end

      interface to real function hyppr (k, n, m, l)
      integer    k, n, m, l
      end

      interface to real function poidf (k, theta)
      integer    k
      real       theta
      end

      interface to real function poipr (k, theta)
      integer    k
      real       theta
      end

      interface to real function aks1df (nobs, d)
      integer    nobs
      real       d
      end

      interface to real function ak21df (nobs, d, wk)
      integer    nobs
      real       d, wk(*)
      end

      interface to real function aks2df (nobsx, nobsy, d)
      integer    nobsx, nobsy
      real       d
      end

      interface to real function ak22df (nobsx, nobsy, d, wk)
      integer    nobsx, nobsy
      real       d, wk(*)
      end

      interface to real function anordf (x)
      real       x
      end

      interface to real function anorin (p)
      real       p
      end

      interface to real function betdf (x, pin, qin)
      real       x, pin, qin
      end

      interface to real function betin (p, pin, qin)
      real       p, pin, qin
      end

      interface to real function bnrdf (x, y, rho)
      real       x, y, rho
      end

      interface to real function chidf (chsq, df)
      real       chsq, df
      end

      interface to real function chiin (p, df)
      real       p, df
      end

      interface to real function csndf (chsq, df, alam)
      real       chsq, df, alam
      end

      interface to real function fdf (f, dfn, dfd)
      real       f, dfn, dfd
      end

      interface to real function fin (p, dfn, dfd)
      real       p, dfn, dfd
      end

      interface to real function gamdf (x, a)
      real       x, a
      end

      interface to real function tdf (t, df)
      real       t, df
      end

      interface to real function tin (p, df)
      real       p, df
      end

      interface to real function tndf (t, idf, delta)
      integer    idf
      real       t, delta
      end

      interface to real function gcdf (x0, iopt, m, x, f)
      integer    iopt, m
      real       x0, x(*), f(*)
      end

      interface to real function g4df (x0, iopt, m, x, f, wk, iwk)
      integer    iopt, m, iwk(*)
      real       x0, x(*), f(*), wk(*)
      end

      interface to real function gcin (p, iopt, m, x, f)
      integer    iopt, m
      real       p, x(*), f(*)
      end

      interface to real function g3in (p, iopt, m, x, f, wk, iwk)
      integer    iopt, m, iwk(*)
      real       p, x(*), f(*), wk(*)
      end

$ENDIF

!
!     Chapter 18:  Random Number Generation
!

      interface to subroutine rnses (table)
      real       table(128)
      end

      interface to subroutine rnges (table)
      real       table(128)
      end

      interface to subroutine rngda (nr, iopt, imin, nmass, probs, iwk, &
     &           wk, ir)
      integer    nr, iopt, imin, nmass, iwk(*), ir(*)
      real       probs(*), wk(*)
      end

      interface to subroutine rngds (prf, iopt, del, nndx, imin, nmass, &
     &           cumpr, lcumpr)
      integer    iopt, nndx, imin, nmass, lcumpr
      real       prf, del, cumpr(*)
      external   prf
      end

      interface to subroutine rngdt (nr, imin, nmass, cumpr, ir)
      integer    nr, imin, nmass, ir(*)
      real       cumpr(*)
      end

      interface to subroutine rnbet (nr, pin, qin, r)
      integer    nr
      real       pin, qin, r(*)
      end

      interface to subroutine rnchi (nr, df, r)
      integer    nr
      real       df, r(*)
      end

      interface to subroutine rnchy (nr, r)
      integer    nr
      real       r(*)
      end

      interface to subroutine rnexp (nr, r)
      integer    nr
      real       r(*)
      end

      interface to subroutine rnext (nr, theta1, theta2, p, r)
      integer    nr
      real       theta1, theta2, p, r(*)
      end

      interface to subroutine rngam (nr, a, r)
      integer    nr
      real       a, r(*)
      end

      interface to subroutine rngcs (cdf, iopt, ndata, table, ldtabl)
      integer    iopt, ndata, ldtabl
      real       cdf, table(ldtabl,*)
      external   cdf
      end

      interface to subroutine rngct (nr, ndata, table, ldtabl, r)
      integer    nr, ndata, ldtabl
      real       table(ldtabl,*), r(*)
      end

      interface to subroutine rnlnl (nr, xm, s, r)
      integer    nr
      real       xm, s, r(*)
      end

      interface to subroutine rnnoa (nr, r)
      integer    nr
      real       r(*)
      end

      interface to real function rnnof ()
      end

      interface to subroutine rnnor (nr, r)
      integer    nr
      real       r(*)
      end

      interface to subroutine rnsta (nr, alpha, bprime, r)
      integer    nr
      real       alpha, bprime, r(*)
      end

      interface to subroutine rnstt (nr, df, r)
      integer    nr
      real       df, r(*)
      end

      interface to subroutine rntri (nr, r)
      integer    nr
      real       r(*)
      end

      interface to subroutine rnvms (nr, c, r)
      integer    nr
      real       c, r(*)
      end

      interface to subroutine rnwib (nr, a, r)
      integer    nr
      real       a, r(*)
      end

      interface to subroutine rncor (n, iopt, ev, a, lda, cor, ldcor)
      integer    n, iopt, lda, ldcor
      real       ev(*), a(lda,*), cor(ldcor,*)
      end

      interface to subroutine r2cor (n, iopt, ev, a, lda, cor, ldcor,   &
     &           iwk, wk)
      integer    n, iopt, lda, ldcor, iwk(n,*)
      real       ev(*), a(lda,*), cor(ldcor,*), wk(*)
      end

      interface to subroutine rndat (ido, nr, k, nsamp, x, ldx, nn, r,  &
     &           ldr)
      integer    ido, nr, k, nsamp, ldx, nn, ldr
      real       x(*), r(*)
      end

      interface to subroutine r2dat (ido, nr, k, nsamp, x, ldx, nn, r,  &
     &           ldr, iwk, wk)
      integer    ido, nr, k, nsamp, ldx, nn, ldr, iwk(*)
      real       x(ldx,*), r(ldr,*), wk(*)
      end

      interface to subroutine rnmvn (nr, k, rsig, ldrsig, r, ldr)
      integer    nr, k, ldrsig, ldr
      real       rsig(ldrsig,*), r(ldr,*)
      end

      interface to subroutine rnsph (nr, k, z, ldz)
      integer    nr, k, ldz
      real       z(ldz,*)
      end

      interface to subroutine rnnos (ifirst, ilast, n, r)
      integer    ifirst, ilast, n
      real       r(*)
      end

      interface to subroutine rnuno (ifirst, ilast, n, r)
      integer    ifirst, ilast, n
      real       r(*)
      end

      interface to subroutine rnarm (nw, const, npar, par, lagar, npma, &
     &           pma, lagma, iadist, avar, a, wi, w)
      integer    nw, npar, npma, iadist, lagar(*), lagma(*)
      real       const, avar, par(*), pma(*), a(*), wi(*), w(*)
      end

      interface to subroutine rnnpp (timbeg, timend, ftheta, themin,    &
     &           themax, neub, ne, r)
      integer    neub, ne
      real       timbeg, timend, ftheta, themin, themax, r(*)
      external   ftheta
      end

      interface to subroutine rnsrs (ido, nrow, nvar, pop, ldpop, nsamp,&
     &           npop, samp, ldsamp, index)
      integer    ido, nrow, nvar, ldpop, nsamp, npop, ldsamp, index(*)
      real       pop(ldpop,*), samp(ldsamp,*)
      end

$IF .NOT. DEFINED (IMSL_STAT_COMMON)

      interface to subroutine rnopg (iopt)
      integer    iopt
      end

      interface to subroutine rnsef (iarray)
      integer    iarray(1565)
      end

      interface to subroutine rngef (iarray)
      integer    iarray(1565)
      end

      interface to subroutine rnisd (iseed1, iseed2)
      integer    iseed1, iseed2
      end

      interface to subroutine rnbin (nr, n, p, ir)
      integer    nr, n, ir(*)
      real       p
      end

      interface to subroutine rngeo (nr, p, ir)
      integer    nr, ir(*)
      real       p
      end

      interface to subroutine rnhyp (nr, n, m, l, ir)
      integer    nr, n, m, l, ir(*)
      end

      interface to subroutine rnlgr (nr, a, ir)
      integer    nr, ir(*)
      real       a
      end

      interface to subroutine rnnbn (nr, rk, p, ir)
      integer    nr, ir(*)
      real       rk, p
      end

      interface to subroutine rnpoi (nr, theta, ir)
      integer    nr, ir(*)
      real       theta
      end

      interface to subroutine rnund (nr, k, ir)
      integer    nr, k, ir(*)
      end

      interface to subroutine rnmtn (nr, n, k, p, ir, ldir)
      integer    nr, n, k, ldir, ir(ldir,*)
      real       p(*)
      end

      interface to subroutine rntab (ido, nrow, ncol, nrtot, nctot,     &
     &           itab, lditab)
      integer    ido, nrow, ncol, lditab, nrtot(*), nctot(*), itab(*)
      end

      interface to subroutine r2tab (ido, nrow, ncol, nrtot, nctot,     &
     &           itab, lditab, iopt, irsum, iwk, wk)
      integer    ido, nrow, ncol, lditab, iopt, irsum, nrtot(*),        &
     &           nctot(*), itab(lditab,*), iwk(*)
      real       wk(*)
      end

      interface to subroutine rnper (k, iper)
      integer    k, iper(*)
      end

      interface to subroutine rnsri (nsamp, npop, index)
      integer    nsamp, npop, index(*)
      end

$ENDIF

$IF .NOT. DEFINED (IMSL_COMMON)

      interface to subroutine rnopt (iopt)
      integer    iopt
      end

      interface to subroutine rnset (iseed)
      integer    iseed
      end

      interface to subroutine rnget (iseed)
      integer    iseed
      end

$ENDIF

$IF .NOT. DEFINED (IMSL_COMMON_SINGLE)

      interface to subroutine rnun (nr, r)
      integer    nr
      real       r(*)
      end

      interface to real function rnunf ()
      end

$ENDIF

!
!     Chapter 19:  Utilities
!

      interface to subroutine rordm (naa, aa, ldaa, na, indaa, a, lda)
      integer    naa, ldaa, na, lda, indaa(*)
      real       aa(*), a(*)
      end

      interface to subroutine r2rdm (naa, aa, ldaa, na, indaa, a, lda,  &
     &           iwk)
      integer    naa, ldaa, na, lda, indaa(*), iwk(*)
      real       aa(ldaa,*), a(lda,*)
      end

      interface to subroutine mvnan (nrow, ncol, iind, ind, x, ldx,     &
     &           iswap, nrmiss)
      integer    nrow, ncol, iind, ldx, nrmiss, ind(*), iswap(*)
      real       x(ldx,*)
      end

      interface to subroutine scolr (nrx, ncx, x, ldx, icomp, iordr,    &
     &           iret, nkey, indkey, iperm, ngroup, ni)
      integer    nrx, ncx, ldx, icomp, iordr, iret, nkey, ngroup,       &
     &           indkey(*), iperm(*), ni(*)
      real       x(*)
      end

      interface to subroutine s2olr (nrx, ncx, x, ldx, icomp, iordr,    &
     &           iret, nkey, indkey, iperm, ngroup, ni, wk, iwk)
      integer    nrx, ncx, ldx, icomp, iordr, iret, nkey, ngroup,       &
     &           indkey(*), iperm(*), ni(*), iwk(*)
      real       x(ldx,*), wk(*)
      end

      interface to subroutine srowr (nrow, ncol, x, ldx, icomp, iordr,  &
     &           iret, nkey, indkey, iperm, ngroup, ni, nrmiss)
      integer    nrow, ncol, ldx, icomp, iordr, iret, nkey, ngroup,     &
     &           nrmiss, indkey(*), iperm(*), ni(*)
      real       x(*)
      end

      interface to subroutine s2owr (nrow, ncol, x, ldx, icomp, iordr,  &
     &           iret, nkey, indkey, iperm, ngroup, ni, nrmiss, wk, iwk)
      integer    nrow, ncol, ldx, icomp, iordr, iret, nkey, ngroup,     &
     &           nrmiss, indkey(*), iperm(*), ni(*), iwk(*)
      real       x(ldx,*), wk(*)
      end

      interface to subroutine gdata (idata, iprint, nobs, nvar, x, ldx, &
     &           ndx)
      integer    idata, iprint, nobs, nvar, ldx, ndx
      real       x(ldx,ndx)
      end

$IF .NOT. DEFINED (IMSL_STAT_COMMON)

      interface to character *(*)function versl (iselct)
      integer    iselct
      end

$ENDIF

$IF .NOT. DEFINED (IMSL_COMMON)

      interface to subroutine wrirn (title, nrmat, ncmat, mat, ldmat,   &
     &           itring)
      integer    nrmat, ncmat, ldmat, itring, mat(ldmat,*)
      character  title*(*)
      end

      interface to subroutine wrirl (title, nrmat, ncmat, mat, ldmat,   &
     &           itring, fmt, rlabel, clabel)
      integer    nrmat, ncmat, ldmat, itring, mat(ldmat,*)
      character  title*(*), fmt*(*), rlabel(*)*(*), clabel(0:*)*(*)
      end

      interface to subroutine wropt (iopt, iset, iscope)
      integer    iopt, iset, iscope
      end

      interface to subroutine pgopt (iopt, ipage)
      integer    iopt, ipage
      end

      interface to subroutine svign (n, ia, ib)
      integer    n, ia(*), ib(*)
      end

      interface to subroutine svigp (n, ia, ib, iperm)
      integer    n, ia(*), ib(*), iperm(*)
      end

      interface to subroutine isrch (n, ivalue, ix, incx, index)
      integer    n, ivalue, incx, index, ix(*)
      end

      interface to subroutine ssrch (n, string, chx, incx, index)
      integer    n, incx, index
      character  string*(*), chx(*)*(*)
      end

      interface to character *1 function achar (i)
      integer    i
      end

      interface to integer function iachar (ch)
      character  ch
      end

      interface to integer function icase (ch)
      character  ch
      end

      interface to integer function iicsr (str1, str2)
      character  str1*(*), str2*(*)
      end

      interface to integer function iidex (chrstr, key)
      character  chrstr*(*), key*(*)
      end

      interface to subroutine cvtsi (string, number)
      integer    number
      character  string*(*)
      end

      interface to real function cpsec ()
      end

      interface to subroutine timdy (ihour, minute, isec)
      integer    ihour, minute, isec
      end

      interface to subroutine tdate (iday, month, iyear)
      integer    iday, month, iyear
      end

      interface to integer function ndays (iday, imonth, iyear)
      integer    iday, imonth, iyear
      end

      interface to subroutine ndyin (ndays, iday, month, iyear)
      integer    ndays, iday, month, iyear
      end

      interface to integer function idywk (iday, imonth, iyear)
      integer    iday, imonth, iyear
      end

$ENDIF

$IF .NOT. DEFINED (IMSL_COMMON_SINGLE)

      interface to subroutine wrrrn (title, nra, nca, a, lda, itring)
      integer    nra, nca, lda, itring
      real       a(*)
      character  title*(*)
      end

      interface to subroutine wrrrl (title, nra, nca, a, lda, itring,   &
     &           fmt, rlabel, clabel)
      integer    nra, nca, lda, itring
      real       a(*)
      character  title*(*), fmt*(*), rlabel(*)*(*), clabel(0:*)*(*)
      end

      interface to subroutine w2rrl (title, nra, nca, a, lda, itring,   &
     &           fmt, rlabel, clabel, chwk)
      integer    nra, nca, lda, itring
      real       a(*)
      character  title*(*), fmt*(*), rlabel(*)*(*), clabel(0:*)*(*),    &
     &           chwk(*)*10
      end

      interface to subroutine permu (n, x, ipermu, ipath, xpermu)
      integer    n, ipath, ipermu(*)
      real       x(*), xpermu(*)
      end

      interface to subroutine perma (nra, nca, a, lda, ipermu, ipath,   &
     &           aper, ldaper)
      integer    nra, nca, lda, ipath, ldaper, ipermu(*)
      real       a(lda,*), aper(ldaper,*)
      end

      interface to subroutine p2rma (nra, nca, a, lda, ipermu, ipath,   &
     &           aper, ldaper, work)
      integer    nra, nca, lda, ipath, ldaper, ipermu(*)
      real       a(lda,*), aper(ldaper,*), work(*)
      end

      interface to subroutine svrgn (n, ra, rb)
      integer    n
      real       ra(*), rb(*)
      end

      interface to subroutine svrgp (n, ra, rb, iperm)
      integer    n, iperm(*)
      real       ra(*), rb(*)
      end

      interface to subroutine srch (n, value, x, incx, index)
      integer    n, incx, index
      real       value, x(*)
      end

$ENDIF

!
!     Chapter 20:  Mathematical Support
!

      interface to subroutine chfac (n, a, lda, tol, irank, r, ldr)
      integer    n, lda, irank, ldr
      real       tol, a(*), r(*)
      end

      interface to subroutine mchol (n, a, lda, tol, irank, r, ldr,     &
     &           dmax, ind)
      integer    n, lda, irank, ldr, ind
      real       tol, dmax, a(*), r(*)
      end

      interface to subroutine girts (n, r, ldr, nb, b, ldb, ipath,      &
     &           irank, x, ldx, rinv, ldrinv)
      integer    n, ldr, nb, ldb, ipath, irank, ldx, ldrinv
      real       r(*), b(*), x(*), rinv(*)
      end

      interface to real function enos (i, n)
      integer    i, n
      end

      interface to real function amillr (x)
      real       x
      end

      interface to subroutine quadt (nrow, nvar, ncol, x, ldx, ind,     &
     &           nbuck, idiscr, part)
      integer    nrow, nvar, ncol, ldx, nbuck, ind(*), idiscr(*)
      real       x(*), part(*)
      end

      interface to subroutine q2adt (nrow, nvar, ncol, x, ldx, ind,     &
     &           nbuck, idiscr, part, ilow, ihigh, wk, iwk)
      integer    nrow, nvar, ncol, ldx, nbuck, ind(*), idiscr(*),       &
     &           ilow(*), ihigh(*), iwk(*)
      real       x(ldx,*), part(*), wk(*)
      end

      interface to subroutine nghbr (nvar, xkey, k, nrow, ncol, x, ldx, &
     &           ind, nbuck, idiscr, part, metric, ipqr, pqd)
      integer    nvar, k, nrow, ncol, ldx, nbuck, metric, ind(*),       &
     &           idiscr(*), ipqr(*)
      real       xkey(*), x(*), part(*), pqd(*)
      end

      interface to subroutine n2hbr (nvar, xkey, k, nrow, ncol, x, ldx, &
     &           ind, nbuck, idiscr, part, metric, ipqr, pqd, ilow,     &
     &           ihigh, iside, bndl, bndh)
      integer    k, nrow, nvar, ncol, ldx, metric, nbuck, ind(*),       &
     &           idiscr(*), ipqr(*), ilow(*), ihigh(*), iside(*)
      real       xkey(*), x(ldx,*), part(*), pqd(*), bndl(*), bndh(*)
      end

$IF .NOT. DEFINED (IMSL_COMMON_SINGLE)

      interface to subroutine linrg (n, a, lda, ainv, ldainv)
      integer    n, lda, ldainv
      real       a(lda,*), ainv(ldainv,*)
      end

      interface to subroutine l2nrg (n, a, lda, ainv, ldainv, wk, iwk)
      integer    n, lda, ldainv, iwk(*)
      real       a(lda,*), ainv(ldainv,*), wk(*)
      end

      interface to subroutine lslrg (n, a, lda, b, ipath, x)
      integer    n, lda, ipath
      real       a(lda,*), b(*), x(*)
      end

      interface to subroutine l2lrg (n, a, lda, b, ipath, x, fac, ipvt, &
     &           wk)
      integer    n, lda, ipath, ipvt(*)
      real       a(lda,*), b(*), x(*), fac(*), wk(*)
      end

      interface to subroutine lftrg (n, a, lda, fac, ldfac, ipvt)
      integer    n, lda, ldfac, ipvt(*)
      real       a(lda,*), fac(ldfac,*)
      end

      interface to subroutine l2trg (n, a, lda, fac, ldfac, ipvt, scale)
      integer    n, lda, ldfac, ipvt(*)
      real       a(lda,*), fac(ldfac,*), scale(*)
      end

      interface to subroutine lfsrg (n, fac, ldfac, ipvt, b, ipath, x)
      integer    n, ldfac, ipath, ipvt(*)
      real       fac(ldfac,*), b(*), x(*)
      end

      interface to subroutine lfdrg (n, fac, ldfac, ipvt, det1, det2)
      integer    n, ldfac, ipvt(*)
      real       det1, det2, fac(ldfac,*)
      end

      interface to subroutine lsgrr (nra, nca, a, lda, tol, irank,      &
     &           ginva, ldginv)
      integer    nra, nca, lda, irank, ldginv
      real       tol, a(lda,*), ginva(ldginv,*)
      end

      interface to subroutine l2grr (nra, nca, a, lda, tol, irank,      &
     &           ginva, ldginv, wka, wk)
      integer    nra, nca, lda, irank, ldginv
      real       tol, a(lda,*), ginva(ldginv,*), wka(*), wk(*)
      end

      interface to subroutine lsbrr (nra, nca, a, lda, b, tol, x, res,  &
     &           kbasis)
      integer    nra, nca, lda, kbasis
      real       tol, a(lda,*), b(*), x(*), res(*)
      end

      interface to subroutine l2brr (nra, nca, a, lda, b, tol, x, res,  &
     &           kbasis, qr, brrux, ipvt, work)
      integer    nra, nca, lda, kbasis, ipvt(*)
      real       tol, a(lda,*), b(*), x(*), res(*), qr(*), brrux(*),    &
     &           work(*)
      end

      interface to subroutine lsqrr (nra, nca, a, lda, b, tol, x, res,  &
     &           kbasis)
      integer    nra, nca, lda, kbasis
      real       tol, a(*), b(*), x(*), res(*)
      end

      interface to subroutine l2qrr (nra, nca, a, lda, b, tol, x, res,  &
     &           kbasis, qr, qraux, ipvt, work)
      integer    nra, nca, lda, kbasis, ipvt(*)
      real       tol, a(lda,*), b(*), x(*), res(*), qr(*), qraux(*),    &
     &           work(*)
      end

      interface to subroutine lsvrr (nra, nca, a, lda, ipath, tol,      &
     &           irank, s, u, ldu, v, ldv)
      integer    nra, nca, lda, ipath, irank, ldu, ldv
      real       tol, a(lda,*), s(*), u(ldu,*), v(ldv,*)
      end

      interface to subroutine l2vrr (nra, nca, a, lda, ipath, tol,      &
     &           irank, s, u, ldu, v, ldv, wka, wk)
      integer    nra, nca, lda, ipath, irank, ldu, ldv
      real       tol, a(lda,*), s(*), u(*), v(*), wka(*), wk(*)
      end

      interface to subroutine evcsf (n, a, lda, eval, evec, ldevec)
      integer    n, lda, ldevec
      real       a(lda,*), eval(*), evec(ldevec,*)
      end

      interface to subroutine e5csf (n, a, lda, eval, evec, ldevec, wk, &
     &           iwk)
      integer    n, lda, ldevec, iwk(n)
      real       a(lda,*), eval(*), evec(ldevec,*), wk(n,3)
      end

      interface to real function episf (n, neval, a, lda, eval, evec,   &
     &           ldevec)
      integer    n, neval, lda, ldevec
      real       a(lda,*), eval(*), evec(ldevec,*)
      end

      interface to real function e2isf (n, neval, a, lda, eval, evec,   &
     &           ldevec, work)
      integer    n, neval, lda, ldevec
      real       a(lda,*), eval(*), evec(ldevec,*), work(*)
      end

      interface to subroutine gvlsp (n, a, lda, b, ldb, eval)
      integer    n, lda, ldb
      real       a(lda,*), b(ldb,*), eval(*)
      end

      interface to subroutine g3lsp (n, a, lda, b, ldb, eval, iwk, wk,  &
     &           s)
      integer    n, lda, ldb, iwk(*)
      real       a(lda,*), b(ldb,*), eval(*), wk(n,*), s(n+1,*)
      end

      interface to subroutine qdags (f, a, b, errabs, errrel, result,   &
     &           errest)
      real       f, a, b, errabs, errrel, result, errest
      external   f
      end

      interface to subroutine q2ags (f, a, b, errabs, errrel, result,   &
     &           errest, maxsub, neval, nsubin, alist, blist, rlist,    &
     &           elist, iord)
      integer    maxsub, neval, nsubin, iord(*)
      real       f, a, b, errabs, errrel, result, errest, alist(*),     &
     &           blist(*), rlist(*), elist(*)
      external   f
      end

      interface to subroutine fftri (n, wfftr)
      integer    n
      real       wfftr(*)
      end

      interface to subroutine fftrf (n, seq, coef)
      integer    n
      real       seq(*), coef(*)
      end

      interface to subroutine f2trf (n, seq, coef, wfftr)
      integer    n
      real       seq(*), coef(*), wfftr(*)
      end

      interface to subroutine fftrb (n, coef, seq)
      integer    n
      real       coef(*), seq(*)
      end

      interface to subroutine f2trb (n, coef, seq, wfftr)
      integer    n
      real       coef(*), seq(*), wfftr(*)
      end

      interface to subroutine uminf (fcn, n, xguess, xscale, fscale,    &
     &           iparam, rparam, x, fvalue)
      integer    n, iparam(*)
      real       fscale, fvalue, xguess(*), xscale(*), rparam(*), x(*)
      external   fcn
      end

      interface to subroutine u2inf (fcn, n, xguess, xscale, fscale,    &
     &           iparam, rparam, x, fvalue, wk)
      integer    n, iparam(*)
      real       fscale, fvalue, xguess(*), xscale(*), rparam(*),       &
     &           x(*), wk(*)
      external   fcn
      end

      interface to subroutine u4inf (iparam, rparam)
      integer    iparam(*)
      real       rparam(*)
      end

      interface to subroutine mxtxf (nra, nca, a, lda, nb, b, ldb)
      integer    nra, nca, lda, nb, ldb
      real       a(lda,*), b(ldb,*)
      end

      interface to subroutine mxtyf (nra, nca, a, lda, nrb, ncb, b, ldb,&
     &           nrc, ncc, c, ldc)
      integer    nra, nca, lda, nrb, ncb, ldb, nrc, ncc, ldc
      real       a(lda,*), b(ldb,*), c(ldc,*)
      end

      interface to subroutine trnrr (nra, nca, a, lda, nrb, ncb, b, ldb)
      integer    nra, nca, lda, nrb, ncb, ldb
      real       a(lda,*), b(ldb,*)
      end

      interface to subroutine mrrrr (nra, nca, a, lda, nrb, ncb, b, ldb,&
     &           nrc, ncc, c, ldc)
      integer    nra, nca, lda, nrb, ncb, ldb, nrc, ncc, ldc
      real       a(lda,*), b(ldb,*), c(ldc,*)
      end

      interface to real function blinf (nra, nca, a, lda, x, y)
      integer    nra, nca, lda
      real       a(*), x(*), y(*)
      end

      interface to real function beta (a, b)
      real       a, b
      end

      interface to real function binom (n, m)
      integer    n, m
      end

      interface to real function gamma (x)
      real       x
      end

      interface to subroutine r9gaml (xmin, xmax)
      real       xmin, xmax
      end

$ENDIF

!
!     Level 1 BLAS
!

$IF .NOT. DEFINED (IMSL_COMMON)

      interface to subroutine iset (n, ia, ix, incx)
      integer    n, ia, incx, ix(*)
      end

      interface to subroutine icopy (n, ix, incx, iy, incy)
      integer    n, incx, incy, ix(*), iy(*)
      end

      interface to subroutine iadd (n, ia, ix, incx)
      integer    n, ia, incx, ix(*)
      end

      interface to subroutine isub (n, ia, ix, incx)
      integer    n, ia, incx, ix(*)
      end

      interface to subroutine iswap (n, ix, incx, iy, incy)
      integer    n, incx, incy, ix(*), iy(*)
      end

      interface to double precision function dsdot (n, sx, incx, sy,    &
     &           incy)
      integer    n, incx, incy
      real       sx(*), sy(*)
      end

      interface to integer function isum (n, ix, incx)
      integer    n, incx, ix(*)
      end

      interface to integer function iimin (n, ix, incx)
      integer    n, incx, ix(*)
      end

      interface to integer function iimax (n, ix, incx)
      integer    n, incx, ix(*)
      end

$ENDIF

$IF .NOT. DEFINED (IMSL_COMMON_SINGLE)

      interface to subroutine sset (n, sa, sx, incx)
      integer    n, incx
      real       sa, sx(*)
      end

      interface to subroutine cset (n, ca, cx, incx)
      integer    n, incx
      complex    ca, cx(*)
      end

      interface to subroutine scopy (n, sx, incx, sy, incy)
      integer    n, incx, incy
      real       sx(*), sy(*)
      end

      interface to subroutine ccopy (n, cx, incx, cy, incy)
      integer    n, incx, incy
      complex    cx(*), cy(*)
      end

      interface to subroutine sscal (n, sa, sx, incx)
      integer    n, incx
      real       sa, sx(*)
      end

      interface to subroutine cscal (n, ca, cx, incx)
      integer    n, incx
      complex    ca, cx(*)
      end

      interface to subroutine csscal (n, sa, cx, incx)
      integer    n, incx
      real       sa
      complex    cx(*)
      end

      interface to subroutine svcal (n, sa, sx, incx, sy, incy)
      integer    n, incx, incy
      real       sa, sx(*), sy(*)
      end

      interface to subroutine cvcal (n, ca, cx, incx, cy, incy)
      integer    n, incx, incy
      complex    ca, cx(*), cy(*)
      end

      interface to subroutine csvcal (n, sa, cx, incx, cy, incy)
      integer    n, incx, incy
      real       sa
      complex    cx(*), cy(*)
      end

      interface to subroutine sadd (n, sa, sx, incx)
      integer    n, incx
      real       sa, sx(*)
      end

      interface to subroutine cadd (n, ca, cx, incx)
      integer    n, incx
      complex    ca, cx(*)
      end

      interface to subroutine ssub (n, sa, sx, incx)
      integer    n, incx
      real       sa, sx(*)
      end

      interface to subroutine csub (n, ca, cx, incx)
      integer    n, incx
      complex    ca, cx(*)
      end

      interface to subroutine saxpy (n, sa, sx, incx, sy, incy)
      integer    n, incx, incy
      real       sa, sx(*), sy(*)
      end

      interface to subroutine caxpy (n, ca, cx, incx, cy, incy)
      integer    n, incx, incy
      complex    ca, cx(*), cy(*)
      end

      interface to subroutine sswap (n, sx, incx, sy, incy)
      integer    n, incx, incy
      real       sx(*), sy(*)
      end

      interface to subroutine cswap (n, cx, incx, cy, incy)
      integer    n, incx, incy
      complex    cx(*), cy(*)
      end

      interface to real function sdot (n, sx, incx, sy, incy)
      integer    n, incx, incy
      real       sx(*), sy(*)
      end

      interface to complex function cdotu (n, cx, incx, cy, incy)
      integer    n, incx, incy
      complex    cx(*), cy(*)
      end

      interface to complex function cdotc (n, cx, incx, cy, incy)
      integer    n, incx, incy
      complex    cx(*), cy(*)
      end

      interface to complex function czdotc (n, cx, incx, cy, incy)
      integer    n, incx, incy
      complex    cx(*), cy(*)
      end

      interface to complex function czdotu (n, cx, incx, cy, incy)
      integer    n, incx, incy
      complex    cx(*), cy(*)
      end

      interface to real function sdsdot (n, sb, sx, incx, sy, incy)
      integer    n, incx, incy
      real       sb, sx(*), sy(*)
      end

      interface to complex function czcdot (n, ca, cx, incx, cy, incy)
      integer    n, incx, incy
      complex    ca, cx(*), cy(*)
      end

      interface to complex function czudot (n, ca, cx, incx, cy, incy)
      integer    n, incx, incy
      complex    ca, cx(*), cy(*)
      end

      interface to real function sddoti (n, sa, acc, sx, incx, sy, incy)
      integer    n, incx, incy
      real       sa, sx(*), sy(*)
      double precision acc(2)
      end

      interface to real function sddota (n, sa, acc, sx, incx, sy, incy)
      integer    n, incx, incy
      real       sa, sx(*), sy(*)
      double precision acc(2)
      end

      interface to complex function czdoti (n, ca, acc, cx, incx, cy,   &
     &           incy)
      integer    n, incx, incy
      double precision acc(4)
      complex    ca, cx(*), cy(*)
      end

      interface to complex function czdota (n, ca, acc, cx, incx, cy,   &
     &           incy)
      integer    n, incx, incy
      double precision acc(4)
      complex    ca, cx(*), cy(*)
      end

      interface to subroutine shprod (n, sx, incx, sy, incy, sz, incz)
      integer    n, incx, incy, incz
      real       sx(*), sy(*), sz(*)
      end

      interface to real function sxyz (n, sx, incx, sy, incy, sz, incz)
      integer    n, incx, incy, incz
      real       sx(*), sy(*), sz(*)
      end

      interface to real function ssum (n, sx, incx)
      integer    n, incx
      real       sx(*)
      end

      interface to real function sasum (n, sx, incx)
      integer    n, incx
      real       sx(*)
      end

      interface to real function scasum (n, cx, incx)
      integer    n, incx
      complex    cx(*)
      end

      interface to real function snrm2 (n, sx, incx)
      integer    n, incx
      real       sx(*)
      end

      interface to real function scnrm2 (n, cx, incx)
      integer    n, incx
      complex    cx(*)
      end

      interface to real function sprdct (n, sx, incx)
      integer    n, incx
      real       sx(*)
      end

      interface to integer function ismin (n, sx, incx)
      integer    n, incx
      real       sx(*)
      end

      interface to integer function ismax (n, sx, incx)
      integer    n, incx
      real       sx(*)
      end

      interface to integer function isamin (n, sx, incx)
      integer    n, incx
      real       sx(*)
      end

      interface to integer function icamin (n, cx, incx)
      integer    n, incx
      complex    cx(*)
      end

      interface to integer function isamax (n, sx, incx)
      integer    n, incx
      real       sx(*)
      end

      interface to integer function icamax (n, cx, incx)
      integer    n, incx
      complex    cx(*)
      end

      interface to subroutine srotg (sa, sb, sc, ss)
      real       sa, sb, sc, ss
      end

      interface to subroutine srot (n, sx, incx, sy, incy, c, s)
      integer    n, incx, incy
      real       c, s, sx(*), sy(*)
      end

      interface to subroutine csrot (n, cx, incx, cy, incy, c, s)
      integer    n, incx, incy
      real       c, s
      complex    cx(*), cy(*)
      end

      interface to subroutine srotmg (sd1, sd2, sx1, sy1, sparam)
      real       sd1, sd2, sx1, sy1, sparam(5)
      end

      interface to subroutine srotm (n, sx, incx, sy, incy, sparam)
      integer    n, incx, incy
      real       sx(*), sy(*), sparam(5)
      end

      interface to subroutine csrotm (n, cx, incx, cy, incy, sparam)
      integer    n, incx, incy
      real       sparam(5)
      complex    cx(*), cy(*)
      end

$ENDIF

!
!     Level 2 BLAS
!

$IF .NOT. DEFINED (IMSL_COMMON_SINGLE)

      interface to subroutine sgemv (trans, m, n, alpha, a, lda, x,     &
     &           incx, beta, y, incy)
      integer    m, n, lda, incx, incy
      real       alpha, beta, a(*), x(*), y(*)
      character  trans*1
      end

      interface to subroutine cgemv (trans, m, n, alpha, a, lda, x,     &
     &           incx, beta, y, incy)
      integer    m, n, lda, incx, incy
      complex    alpha, beta, a(*), x(*), y(*)
      character  trans*1
      end

      interface to subroutine sgbmv (trans, m, n, nlca, nuca, alpha, a, &
     &           lda, x, incx, beta, y, incy)
      integer    m, n, nlca, nuca, lda, incx, incy
      real       alpha, beta, a(lda,*), x(*), y(*)
      character  trans*1
      end

      interface to subroutine cgbmv (trans, m, n, nlca, nuca, alpha, a, &
     &           lda, x, incx, beta, y, incy)
      integer    m, n, nlca, nuca, lda, incx, incy
      complex    alpha, beta, a(lda,*), x(*), y(*)
      character  trans*1
      end

      interface to subroutine chemv (uplo, n, alpha, a, lda, x, incx,   &
     &           beta, y, incy)
      integer    n, lda, incx, incy
      complex    alpha, beta, a(lda,*), x(*), y(*)
      character  uplo*1
      end

      interface to subroutine chbmv (uplo, n, ncoda, alpha, a, lda, x,  &
     &           incx, beta, y, incy)
      integer    n, ncoda, lda, incx, incy
      complex    alpha, beta, a(lda,*), x(*), y(*)
      character  uplo*1
      end

      interface to subroutine ssymv (uplo, n, alpha, a, lda, x, incx,   &
     &           beta, y, incy)
      integer    n, lda, incx, incy
      real       alpha, beta, a(lda,*), x(*), y(*)
      character  uplo*1
      end

      interface to subroutine ssbmv (uplo, n, ncoda, alpha, a, lda, x,  &
     &           incx, beta, y, incy)
      integer    ncoda, n, lda, incx, incy
      real       alpha, beta, a(lda,*), x(*), y(*)
      character  uplo*1
      end

      interface to subroutine strmv (uplo, trans, diag, n, a, lda, x,   &
     &           incx)
      integer    n, lda, incx
      real       a(lda,*), x(*)
      character  uplo*1, trans*1, diag*1
      end

      interface to subroutine ctrmv (uplo, trans, diag, n, a, lda, x,   &
     &           incx)
      integer    n, lda, incx
      complex    a(lda,*), x(*)
      character  uplo*1, trans*1, diag*1
      end

      interface to subroutine stbmv (uplo, trans, diag, n, ncoda, a,    &
     &           lda, x, incx)
      integer    n, ncoda, lda, incx
      real       a(lda,*), x(*)
      character  uplo*1, trans*1, diag*1
      end

      interface to subroutine ctbmv (uplo, trans, diag, n, ncoda, a,    &
     &           lda, x, incx)
      integer    n, ncoda, lda, incx
      complex    a(lda,*), x(*)
      character  uplo*1, trans*1, diag*1
      end

      interface to subroutine strsv (uplo, trans, diag, n, a, lda, x,   &
     &           incx)
      integer    n, lda, incx
      real       a(*), x(*)
      character  uplo*1, trans*1, diag*1
      end

      interface to subroutine ctrsv (uplo, trans, diag, n, a, lda, x,   &
     &           incx)
      integer    n, lda, incx
      complex    a(lda,*), x(*)
      character  uplo*1, trans*1, diag*1
      end

      interface to subroutine stbsv (uplo, trans, diag, n, ncoda, a,    &
     &           lda, x, incx)
      integer    n, ncoda, lda, incx
      real       a(lda,*), x(*)
      character  uplo*1, trans*1, diag*1
      end

      interface to subroutine ctbsv (uplo, trans, diag, n, ncoda, a,    &
     &           lda, x, incx)
      integer    n, ncoda, lda, incx
      complex    a(lda,*), x(*)
      character  uplo*1, trans*1, diag*1
      end

      interface to subroutine sger (m, n, alpha, x, incx, y, incy, a,   &
     &           lda)
      integer    m, n, incx, incy, lda
      real       alpha, x(*), y(*), a(*)
      end

      interface to subroutine cgeru (m, n, alpha, x, incx, y, incy, a,  &
     &           lda)
      integer    m, n, incx, incy, lda
      complex    alpha, x(*), y(*), a(*)
      end

      interface to subroutine cgerc (m, n, alpha, x, incx, y, incy, a,  &
     &           lda)
      integer    m, n, incx, incy, lda
      complex    alpha, x(*), y(*), a(*)
      end

      interface to subroutine cher (uplo, n, alpha, x, incx, a, lda)
      integer    n, incx, lda
      real       alpha
      complex    x(*), a(*)
      character  uplo*1
      end

      interface to subroutine cher2 (uplo, n, alpha, x, incx, y, incy,  &
     &           a, lda)
      integer    n, incx, incy, lda
      complex    alpha, x(*), y(*), a(lda,*)
      character  uplo*1
      end

      interface to subroutine ssyr (uplo, n, alpha, x, incx, a, lda)
      integer    n, incx, lda
      real       alpha, x(*), a(*)
      character  uplo*1
      end

      interface to subroutine ssyr2 (uplo, n, alpha, x, incx, y, incy,  &
     &           a, lda)
      integer    n, incx, incy, lda
      real       alpha, x(*), y(*), a(lda,*)
      character  uplo*1
      end

$ENDIF

!
!     Level 3 BLAS
!

$IF .NOT. DEFINED (IMSL_COMMON_SINGLE)

      interface to subroutine sgemm (transa, transb, m, n, k, alpha, a, &
     &           lda, b, ldb, beta, c, ldc)
      integer    m, n, k, lda, ldb, ldc
      real       alpha, beta, a(lda,*), b(ldb,*), c(ldc,*)
      character  transa*1, transb*1
      end

      interface to subroutine cgemm (transa, transb, m, n, k, alpha, a, &
     &           lda, b, ldb, beta, c, ldc)
      integer    m, n, k, lda, ldb, ldc
      complex    alpha, beta, a(lda,*), b(ldb,*), c(ldc,*)
      character  transa*1, transb*1
      end

      interface to subroutine ssymm (side, uplo, m, n, alpha, a, lda, b,&
     &           ldb, beta, c, ldc)
      integer    m, n, lda, ldb, ldc
      real       alpha, beta, a(lda,*), b(ldb,*), c(ldc,*)
      character  side*1, uplo*1
      end

      interface to subroutine csymm (side, uplo, m, n, alpha, a, lda, b,&
     &           ldb, beta, c, ldc)
      integer    m, n, lda, ldb, ldc
      complex    alpha, beta, a(lda,*), b(ldb,*), c(ldc,*)
      character  side*1, uplo*1
      end

      interface to subroutine chemm (side, uplo, m, n, alpha, a, lda, b,&
     &           ldb, beta, c, ldc)
      integer    m, n, lda, ldb, ldc
      complex    alpha, beta, a(lda,*), b(ldb,*), c(ldc,*)
      character  side*1, uplo*1
      end

      interface to subroutine ssyrk (uplo, trans, n, k, alpha, a, lda,  &
     &           beta, c, ldc)
      integer    n, k, lda, ldc
      real       alpha, beta, a(lda,*), c(ldc,*)
      character  uplo*1, trans*1
      end

      interface to subroutine csyrk (uplo, trans, n, k, alpha, a, lda,  &
     &           beta, c, ldc)
      integer    n, k, lda, ldc
      complex    alpha, beta, a(lda,*), c(ldc,*)
      character  uplo*1, trans*1
      end

      interface to subroutine cherk (uplo, trans, n, k, alpha, a, lda,  &
     &           beta, c, ldc)
      integer    n, k, lda, ldc
      real       alpha, beta
      complex    a(lda,*), c(ldc,*)
      character  uplo*1, trans*1
      end

      interface to subroutine ssyr2k (uplo, trans, n, k, alpha, a, lda, &
     &           b, ldb, beta, c, ldc)
      integer    n, k, lda, ldb, ldc
      real       alpha, beta, a(lda,*), b(ldb,*), c(ldc,*)
      character  uplo*1, trans*1
      end

      interface to subroutine csyr2k (uplo, trans, n, k, alpha, a, lda, &
     &           b, ldb, beta, c, ldc)
      integer    n, k, lda, ldb, ldc
      complex    alpha, beta, a(lda,*), b(ldb,*), c(ldc,*)
      character  uplo*1, trans*1
      end

      interface to subroutine cher2k (uplo, trans, n, k, alpha, a, lda, &
     &           b, ldb, beta, c, ldc)
      integer    n, k, lda, ldb, ldc
      real       beta
      complex    alpha, a(lda,*), b(ldb,*), c(ldc,*)
      character  uplo*1, trans*1
      end

      interface to subroutine strmm (side, uplo, transa, diag, m, n,    &
     &           alpha, a, lda, b, ldb)
      integer    m, n, lda, ldb
      real       alpha, a(lda,*), b(ldb,*)
      character  side*1, uplo*1, transa*1, diag*1
      end

      interface to subroutine ctrmm (side, uplo, transa, diag, m, n,    &
     &           alpha, a, lda, b, ldb)
      integer    m, n, lda, ldb
      complex    alpha, a(lda,*), b(ldb,*)
      character  side*1, uplo*1, transa*1, diag*1
      end

      interface to subroutine strsm (side, uplo, transa, diag, m, n,    &
     &           alpha, a, lda, b, ldb)
      integer    m, n, lda, ldb
      real       alpha, a(lda,*), b(ldb,*)
      character  side*1, uplo*1, transa*1, diag*1
      end

      interface to subroutine ctrsm (side, uplo, transa, diag, m, n,    &
     &           alpha, a, lda, b, ldb)
      integer    m, n, lda, ldb
      complex    alpha, a(lda,*), b(ldb,*)
      character  side*1, uplo*1, transa*1, diag*1
      end

$ENDIF

!
!     Reference Material
!

$IF .NOT. DEFINED (IMSL_COMMON)

      interface to subroutine erset (iersvr, ipact, isact)
      integer    iersvr, ipact, isact
      end

      interface to integer function iercd ()
      end

      interface to integer function n1rty (iopt)
      integer    iopt
      end

      interface to subroutine iwkcin (nelmts, nalc)
      integer    nelmts, nalc
      end

      interface to subroutine iwkin (nsu)
      integer    nsu
      end

      interface to integer function imach (n)
      integer    n
      end

      interface to subroutine umach (n, nunit)
      integer    n, nunit
      end

$ENDIF

$IF .NOT. DEFINED (IMSL_COMMON_SINGLE)

      interface to real function amach (n)
      integer    n
      end

      interface to logical function ifnan(x)
      real       x
      end

$ENDIF

!
!     Deprecated Routines
!

$IF .NOT. DEFINED (IMSL_COMMON_SINGLE)

      interface to real function g2df (x0, iopt, m, x, f, wk)
      integer    iopt, m
      real       x0, x(*), f(*), wk(*)
      end

      interface to real function g3df (xx0, iopt, m, xx, f, c)
      integer    iopt, m
      real       xx0, xx(*), f(*), c(*)
      end

      interface to real function g2in (p, iopt, m, x, f, wk)
      integer    iopt, m
      real       p, x(*), f(*), wk(*)
      end

      interface to subroutine shouap (n, sy, k, j, sa, nrh, nch, sh,    &
     &           ldh)
      integer    k, j, n, nch, nrh, ldh
      real       sa, sy(*), sh(ldh,*)
      end

      interface to subroutine shoutr (n, x, k, j, v, beta)
      integer    n, k, j
      real       beta, x(*), v(*)
      end

$ENDIF

$DEFINE IMSL_STAT_SINGLE        ! Single-precision STAT/LIBRARY routines

$IF .NOT. DEFINED (IMSL_STAT_COMMON)
$DEFINE IMSL_STAT_COMMON        ! STAT/LIBRARY routines common to both
$ENDIF                          ! single- and double-precision

$IF .NOT. DEFINED (IMSL_COMMON_SINGLE)
$DEFINE IMSL_COMMON_SINGLE      ! Single-precision routines common to
$ENDIF                          ! both MATH/LIBRARY and STAT/LIBRARY

$IF .NOT. DEFINED (IMSL_COMMON)
$DEFINE IMSL_COMMON             ! Routines common to both MATH/LIBRARY
$ENDIF                          ! and STAT/LIBRARY

$ENDIF
