169 SUBROUTINE strt03( UPLO, TRANS, DIAG, N, NRHS, A, LDA, SCALE,
170 $ cnorm, tscal, x, ldx, b, ldb, work, resid )
178 CHARACTER DIAG, TRANS, UPLO
179 INTEGER LDA, LDB, LDX, N, NRHS
180 REAL RESID, SCALE, TSCAL
183 REAL A( lda, * ), B( ldb, * ), CNORM( * ),
184 $ work( * ), x( ldx, * )
191 parameter ( one = 1.0e+0, zero = 0.0e+0 )
195 REAL BIGNUM, EPS, ERR, SMLNUM, TNORM, XNORM, XSCAL
201 EXTERNAL lsame, isamax, slamch
207 INTRINSIC abs, max, real
213 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
217 eps = slamch(
'Epsilon' )
218 smlnum = slamch(
'Safe minimum' )
219 bignum = one / smlnum
220 CALL slabad( smlnum, bignum )
226 IF( lsame( diag,
'N' ) )
THEN
228 tnorm = max( tnorm, tscal*abs( a( j, j ) )+cnorm( j ) )
232 tnorm = max( tnorm, tscal+cnorm( j ) )
241 CALL scopy( n, x( 1, j ), 1, work, 1 )
242 ix = isamax( n, work, 1 )
243 xnorm = max( one, abs( x( ix, j ) ) )
244 xscal = ( one / xnorm ) /
REAL( n )
245 CALL sscal( n, xscal, work, 1 )
246 CALL strmv( uplo, trans, diag, n, a, lda, work, 1 )
247 CALL saxpy( n, -scale*xscal, b( 1, j ), 1, work, 1 )
248 ix = isamax( n, work, 1 )
249 err = tscal*abs( work( ix ) )
250 ix = isamax( n, x( 1, j ), 1 )
251 xnorm = abs( x( ix, j ) )
252 IF( err*smlnum.LE.xnorm )
THEN
259 IF( err*smlnum.LE.tnorm )
THEN
266 resid = max( resid, err )
subroutine strt03(UPLO, TRANS, DIAG, N, NRHS, A, LDA, SCALE, CNORM, TSCAL, X, LDX, B, LDB, WORK, RESID)
STRT03
subroutine strmv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
STRMV
subroutine saxpy(N, SA, SX, INCX, SY, INCY)
SAXPY
subroutine slabad(SMALL, LARGE)
SLABAD
subroutine sscal(N, SA, SX, INCX)
SSCAL
subroutine scopy(N, SX, INCX, SY, INCY)
SCOPY