150 SUBROUTINE strt02( UPLO, TRANS, DIAG, N, NRHS, A, LDA, X, LDX, B,
159 CHARACTER diag, trans, uplo
160 INTEGER lda, ldb, ldx, n, nrhs
164 REAL a( lda, * ), b( ldb, * ), work( * ),
172 parameter( zero = 0.0e+0, one = 1.0e+0 )
176 REAL anorm, bnorm, eps, xnorm
193 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
200 IF(
lsame( trans,
'N' ) )
THEN
201 anorm =
slantr(
'1', uplo, diag, n, n, a, lda, work )
203 anorm =
slantr(
'I', uplo, diag, n, n, a, lda, work )
209 IF( anorm.LE.zero )
THEN
219 CALL
scopy( n, x( 1, j ), 1, work, 1 )
220 CALL
strmv( uplo, trans, diag, n, a, lda, work, 1 )
221 CALL
saxpy( n, -one, b( 1, j ), 1, work, 1 )
222 bnorm =
sasum( n, work, 1 )
223 xnorm =
sasum( n, x( 1, j ), 1 )
224 IF( xnorm.LE.zero )
THEN
227 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )