148 SUBROUTINE dtrt02( UPLO, TRANS, DIAG, N, NRHS, A, LDA, X, LDX, B,
156 CHARACTER DIAG, TRANS, UPLO
157 INTEGER LDA, LDB, LDX, N, NRHS
158 DOUBLE PRECISION RESID
161 DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * ),
168 DOUBLE PRECISION ZERO, ONE
169 parameter( zero = 0.0d+0, one = 1.0d+0 )
173 DOUBLE PRECISION ANORM, BNORM, EPS, XNORM
177 DOUBLE PRECISION DASUM, DLAMCH, DLANTR
178 EXTERNAL lsame, dasum, dlamch, dlantr
190 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
197 IF( lsame( trans,
'N' ) )
THEN
198 anorm = dlantr(
'1', uplo, diag, n, n, a, lda, work )
200 anorm = dlantr(
'I', uplo, diag, n, n, a, lda, work )
205 eps = dlamch(
'Epsilon' )
206 IF( anorm.LE.zero )
THEN
216 CALL dcopy( n, x( 1, j ), 1, work, 1 )
217 CALL dtrmv( uplo, trans, diag, n, a, lda, work, 1 )
218 CALL daxpy( n, -one, b( 1, j ), 1, work, 1 )
219 bnorm = dasum( n, work, 1 )
220 xnorm = dasum( n, x( 1, j ), 1 )
221 IF( xnorm.LE.zero )
THEN
224 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine dtrt02(uplo, trans, diag, n, nrhs, a, lda, x, ldx, b, ldb, work, resid)
DTRT02
subroutine daxpy(n, da, dx, incx, dy, incy)
DAXPY
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dtrmv(uplo, trans, diag, n, a, lda, x, incx)
DTRMV