148 SUBROUTINE strt02( UPLO, TRANS, DIAG, N, NRHS, A, LDA, X, LDX, B,
156 CHARACTER DIAG, TRANS, UPLO
157 INTEGER LDA, LDB, LDX, N, NRHS
161 REAL A( LDA, * ), B( LDB, * ), WORK( * ),
169 parameter( zero = 0.0e+0, one = 1.0e+0 )
173 REAL ANORM, BNORM, EPS, XNORM
177 REAL SASUM, SLAMCH, SLANTR
178 EXTERNAL lsame, sasum, slamch, slantr
190 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
197 IF( lsame( trans,
'N' ) )
THEN
198 anorm = slantr(
'1', uplo, diag, n, n, a, lda, work )
200 anorm = slantr(
'I', uplo, diag, n, n, a, lda, work )
205 eps = slamch(
'Epsilon' )
206 IF( anorm.LE.zero )
THEN
216 CALL scopy( n, x( 1, j ), 1, work, 1 )
217 CALL strmv( uplo, trans, diag, n, a, lda, work, 1 )
218 CALL saxpy( n, -one, b( 1, j ), 1, work, 1 )
219 bnorm = sasum( n, work, 1 )
220 xnorm = sasum( n, x( 1, j ), 1 )
221 IF( xnorm.LE.zero )
THEN
224 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine strmv(uplo, trans, diag, n, a, lda, x, incx)
STRMV
subroutine strt02(uplo, trans, diag, n, nrhs, a, lda, x, ldx, b, ldb, work, resid)
STRT02