150 SUBROUTINE dtrt02( UPLO, TRANS, DIAG, N, NRHS, A, LDA, X, LDX, B,
159 CHARACTER DIAG, TRANS, UPLO
160 INTEGER LDA, LDB, LDX, N, NRHS
161 DOUBLE PRECISION RESID
164 DOUBLE PRECISION A( lda, * ), B( ldb, * ), WORK( * ),
171 DOUBLE PRECISION ZERO, ONE
172 parameter ( zero = 0.0d+0, one = 1.0d+0 )
176 DOUBLE PRECISION ANORM, BNORM, EPS, XNORM
180 DOUBLE PRECISION DASUM, DLAMCH, DLANTR
181 EXTERNAL lsame, dasum, dlamch, dlantr
193 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
200 IF( lsame( trans,
'N' ) )
THEN
201 anorm = dlantr(
'1', uplo, diag, n, n, a, lda, work )
203 anorm = dlantr(
'I', uplo, diag, n, n, a, lda, work )
208 eps = dlamch(
'Epsilon' )
209 IF( anorm.LE.zero )
THEN
219 CALL dcopy( n, x( 1, j ), 1, work, 1 )
220 CALL dtrmv( uplo, trans, diag, n, a, lda, work, 1 )
221 CALL daxpy( n, -one, b( 1, j ), 1, work, 1 )
222 bnorm = dasum( n, work, 1 )
223 xnorm = dasum( n, x( 1, j ), 1 )
224 IF( xnorm.LE.zero )
THEN
227 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine dcopy(N, DX, INCX, DY, INCY)
DCOPY
subroutine daxpy(N, DA, DX, INCX, DY, INCY)
DAXPY
subroutine dtrt02(UPLO, TRANS, DIAG, N, NRHS, A, LDA, X, LDX, B, LDB, WORK, RESID)
DTRT02
subroutine dtrmv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
DTRMV