167 SUBROUTINE strt03( UPLO, TRANS, DIAG, N, NRHS, A, LDA, SCALE,
168 $ CNORM, TSCAL, X, LDX, B, LDB, WORK, RESID )
175 CHARACTER DIAG, TRANS, UPLO
176 INTEGER LDA, LDB, LDX, N, NRHS
177 REAL RESID, SCALE, TSCAL
180 REAL A( LDA, * ), B( LDB, * ), CNORM( * ),
181 $ work( * ), x( ldx, * )
188 parameter( one = 1.0e+0, zero = 0.0e+0 )
192 REAL BIGNUM, EPS, ERR, SMLNUM, TNORM, XNORM, XSCAL
198 EXTERNAL lsame, isamax, slamch
204 INTRINSIC abs, max, real
210 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
214 eps = slamch(
'Epsilon' )
215 smlnum = slamch(
'Safe minimum' )
216 bignum = one / smlnum
222 IF( lsame( diag,
'N' ) )
THEN
224 tnorm = max( tnorm, tscal*abs( a( j, j ) )+cnorm( j ) )
228 tnorm = max( tnorm, tscal+cnorm( j ) )
237 CALL scopy( n, x( 1, j ), 1, work, 1 )
238 ix = isamax( n, work, 1 )
239 xnorm = max( one, abs( x( ix, j ) ) )
240 xscal = ( one / xnorm ) / real( n )
241 CALL sscal( n, xscal, work, 1 )
242 CALL strmv( uplo, trans, diag, n, a, lda, work, 1 )
243 CALL saxpy( n, -scale*xscal, b( 1, j ), 1, work, 1 )
244 ix = isamax( n, work, 1 )
245 err = tscal*abs( work( ix ) )
246 ix = isamax( n, x( 1, j ), 1 )
247 xnorm = abs( x( ix, j ) )
248 IF( err*smlnum.LE.xnorm )
THEN
255 IF( err*smlnum.LE.tnorm )
THEN
262 resid = max( resid, err )
subroutine saxpy(n, sa, sx, incx, sy, incy)
SAXPY
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine sscal(n, sa, sx, incx)
SSCAL
subroutine strmv(uplo, trans, diag, n, a, lda, x, incx)
STRMV
subroutine strt03(uplo, trans, diag, n, nrhs, a, lda, scale, cnorm, tscal, x, ldx, b, ldb, work, resid)
STRT03