SUBROUTINE DTRDI(T,LDT,N,DET,JOB,INFO) C***BEGIN PROLOGUE DTRDI C***DATE WRITTEN 780814 (YYMMDD) C***REVISION DATE 820801 (YYMMDD) C***CATEGORY NO. D2A3,D3A3 C***KEYWORDS DETERMINANT,DOUBLE PRECISION,INVERSE,LINEAR ALGEBRA, C LINPACK,MATRIX,TRIANGULAR C***AUTHOR MOLER, C. B., (U. OF NEW MEXICO) C***PURPOSE Computes the determinant and inverse of a d.p. TRIANGULAR C matrix. C***DESCRIPTION C C DTRDI computes the determinant and inverse of a double precision C triangular matrix. C C On Entry C C T DOUBLE PRECISION(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 = 010 no det, inverse of lower triangular. C = 011 no det, inverse of upper triangular. C = 100 det, no inverse. C = 110 det, inverse of lower triangular. C = 111 det, inverse of upper triangular. C C On Return C C T inverse of original matrix if requested. C Otherwise unchanged. C C DET DOUBLE PRECISION(2) C determinant of original matrix if requested. C Otherwise not referenced. C DETERMINANT = DET(1) * 10.0**DET(2) C with 1.0 .LE. DABS(DET(1)) .LT. 10.0 C or DET(1) .EQ. 0.0 . C C INFO INTEGER C INFO contains zero if the system is nonsingular C and the inverse is requested. C Otherwise INFO contains the index of C a zero diagonal element of T. C C C LINPACK. This version dated 08/14/78 . C Cleve Moler, University of New Mexico, Argonne National Lab. C C Subroutines and Functions C C BLAS DAXPY,DSCAL C Fortran DABS,MOD C***REFERENCES DONGARRA J.J., BUNCH J.R., MOLER C.B., STEWART G.W., C *LINPACK USERS GUIDE*, SIAM, 1979. C***ROUTINES CALLED DAXPY,DSCAL C***END PROLOGUE DTRDI