124 SUBROUTINE dtrt01( UPLO, DIAG, N, A, LDA, AINV, LDAINV, RCOND,
134 INTEGER lda, ldainv, n
135 DOUBLE PRECISION rcond, resid
138 DOUBLE PRECISION a( lda, * ), ainv( ldainv, * ), work( * )
144 DOUBLE PRECISION zero, one
145 parameter( zero = 0.0d+0, one = 1.0d+0 )
149 DOUBLE PRECISION ainvnm, anorm, eps
175 anorm =
dlantr(
'1', uplo, diag, n, n, a, lda, work )
176 ainvnm =
dlantr(
'1', uplo, diag, n, n, ainv, ldainv, work )
177 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
182 rcond = ( one / anorm ) / ainvnm
186 IF(
lsame( diag,
'U' ) )
THEN
194 IF(
lsame( uplo,
'U' ) )
THEN
196 CALL
dtrmv(
'Upper',
'No transpose', diag,
j, a, lda,
201 CALL
dtrmv(
'Lower',
'No transpose', diag, n-
j+1, a(
j,
j ),
202 $ lda, ainv(
j,
j ), 1 )
209 ainv(
j,
j ) = ainv(
j,
j ) - one
214 resid =
dlantr(
'1', uplo,
'Non-unit', n, n, ainv, ldainv, work )
216 resid = ( ( resid*rcond ) / dble( n ) ) / eps
subroutine dtrt01(UPLO, DIAG, N, A, LDA, AINV, LDAINV, RCOND, WORK, RESID)
DTRT01
double precision function dlantr(NORM, UPLO, DIAG, M, N, A, LDA, WORK)
DLANTR returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a trapezoidal or triangular matrix.
logical function lsame(CA, CB)
LSAME
double precision function dlamch(CMACH)
DLAMCH
set ue cd $ADTTMP cat<< EOF > tmp f Program LinearEquations Implicit none Real j
subroutine dtrmv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
DTRMV