# ctrco.f

          SUBROUTINE CTRCO (T, LDT, N, RCOND, Z, JOB)
    C***BEGIN PROLOGUE  CTRCO
    C***PURPOSE  Estimate the condition number of a triangular matrix.
    C***LIBRARY   SLATEC (LINPACK)
    C***CATEGORY  D2C3
    C***TYPE      COMPLEX (STRCO-S, DTRCO-D, CTRCO-C)
    C***KEYWORDS  CONDITION NUMBER, LINEAR ALGEBRA, LINPACK,
    C             TRIANGULAR MATRIX
    C***AUTHOR  Moler, C. B., (U. of New Mexico)
    C***DESCRIPTION
    C
    C     CTRCO estimates the condition of a complex triangular matrix.
    C
    C     On Entry
    C
    C        T       COMPLEX(LDT,N)
    C                T contains the triangular matrix.  The zero
    C                elements of the matrix are not referenced, and
    C                the corresponding elements of the array can be
    C                used to store other information.
    C
    C        LDT     INTEGER
    C                LDT is the leading dimension of the array T.
    C
    C        N       INTEGER
    C                N is the order of the system.
    C
    C        JOB     INTEGER
    C                = 0         T  is lower triangular.
    C                = nonzero   T  is upper triangular.
    C
    C     On Return
    C
    C        RCOND   REAL
    C                an estimate of the reciprocal condition of  T .
    C                For the system  T*X = B , relative perturbations
    C                in  T  and  B  of size  EPSILON  may cause
    C                relative perturbations in  X  of size  EPSILON/RCOND .
    C                If  RCOND  is so small that the logical expression
    C                           1.0 + RCOND .EQ. 1.0
    C                is true, then  T  may be singular to working
    C                precision.  In particular,  RCOND  is zero  if
    C                exact singularity is detected or the estimate
    C                underflows.
    C
    C        Z       COMPLEX(N)
    C                a work vector whose contents are usually unimportant.
    C                If  T  is close to a singular matrix, then  Z  is
    C                an approximate null vector in the sense that
    C                NORM(A*Z) = RCOND*NORM(A)*NORM(Z) .
    C
    C***REFERENCES  J. J. Dongarra, J. R. Bunch, C. B. Moler, and G. W.
    C                 Stewart, LINPACK Users' Guide, SIAM, 1979.
    C***ROUTINES CALLED  CAXPY, CSSCAL, SCASUM
    C***REVISION HISTORY  (YYMMDD)
    C   780814  DATE WRITTEN
    C   890531  Changed all specific intrinsics to generic.  (WRB)
    C   890831  Modified array declarations.  (WRB)
    C   890831  REVISION DATE from Version 3.2
    C   891214  Prologue converted to Version 4.0 format.  (BAB)
    C   900326  Removed duplicate information from DESCRIPTION section.
    C           (WRB)
    C   920501  Reformatted the REFERENCES section.  (WRB)
    C***END PROLOGUE  CTRCO