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
180 REAL SASUM, SLAMCH, SLANTR
181 EXTERNAL lsame, sasum, slamch, slantr
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 )
208 eps = slamch(
'Epsilon' )
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 )
subroutine strt02(UPLO, TRANS, DIAG, N, NRHS, A, LDA, X, LDX, B, LDB, WORK, RESID)
STRT02
subroutine strmv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
STRMV
subroutine saxpy(N, SA, SX, INCX, SY, INCY)
SAXPY
subroutine scopy(N, SX, INCX, SY, INCY)
SCOPY