122 SUBROUTINE dtrt01( UPLO, DIAG, N, A, LDA, AINV, LDAINV, RCOND,
131 INTEGER LDA, LDAINV, N
132 DOUBLE PRECISION RCOND, RESID
135 DOUBLE PRECISION A( LDA, * ), AINV( LDAINV, * ), WORK( * )
141 DOUBLE PRECISION ZERO, ONE
142 parameter( zero = 0.0d+0, one = 1.0d+0 )
146 DOUBLE PRECISION AINVNM, ANORM, EPS
150 DOUBLE PRECISION DLAMCH, DLANTR
151 EXTERNAL lsame, dlamch, dlantr
171 eps = dlamch(
'Epsilon' )
172 anorm = dlantr(
'1', uplo, diag, n, n, a, lda, work )
173 ainvnm = dlantr(
'1', uplo, diag, n, n, ainv, ldainv, work )
174 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
179 rcond = ( one / anorm ) / ainvnm
183 IF( lsame( diag,
'U' ) )
THEN
191 IF( lsame( uplo,
'U' ) )
THEN
193 CALL dtrmv(
'Upper',
'No transpose', diag, j, a, lda,
198 CALL dtrmv(
'Lower',
'No transpose', diag, n-j+1, a( j, j ),
199 $ lda, ainv( j, j ), 1 )
206 ainv( j, j ) = ainv( j, j ) - one
211 resid = dlantr(
'1', uplo,
'Non-unit', n, n, ainv, ldainv, work )
213 resid = ( ( resid*rcond ) / dble( n ) ) / eps
subroutine dtrt01(uplo, diag, n, a, lda, ainv, ldainv, rcond, work, resid)
DTRT01
subroutine dtrmv(uplo, trans, diag, n, a, lda, x, incx)
DTRMV