159 SUBROUTINE stpt03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
160 $ TSCAL, X, LDX, B, LDB, WORK, RESID )
167 CHARACTER DIAG, TRANS, UPLO
168 INTEGER LDB, LDX, N, NRHS
169 REAL RESID, SCALE, TSCAL
172 REAL AP( * ), B( LDB, * ), CNORM( * ), WORK( * ),
180 parameter( one = 1.0e+0, zero = 0.0e+0 )
184 REAL BIGNUM, EPS, ERR, SMLNUM, TNORM, XNORM, XSCAL
190 EXTERNAL lsame, isamax, slamch
196 INTRINSIC abs, max, real
202 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
206 eps = slamch(
'Epsilon' )
207 smlnum = slamch(
'Safe minimum' )
208 bignum = one / smlnum
214 IF( lsame( diag,
'N' ) )
THEN
215 IF( lsame( uplo,
'U' ) )
THEN
218 tnorm = max( tnorm, tscal*abs( ap( jj ) )+cnorm( j ) )
224 tnorm = max( tnorm, tscal*abs( ap( jj ) )+cnorm( j ) )
230 tnorm = max( tnorm, tscal+cnorm( j ) )
239 CALL scopy( n, x( 1, j ), 1, work, 1 )
240 ix = isamax( n, work, 1 )
241 xnorm = max( one, abs( x( ix, j ) ) )
242 xscal = ( one / xnorm ) / real( n )
243 CALL sscal( n, xscal, work, 1 )
244 CALL stpmv( uplo, trans, diag, n, ap, work, 1 )
245 CALL saxpy( n, -scale*xscal, b( 1, j ), 1, work, 1 )
246 ix = isamax( n, work, 1 )
247 err = tscal*abs( work( ix ) )
248 ix = isamax( n, x( 1, j ), 1 )
249 xnorm = abs( x( ix, j ) )
250 IF( err*smlnum.LE.xnorm )
THEN
257 IF( err*smlnum.LE.tnorm )
THEN
264 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 stpmv(uplo, trans, diag, n, ap, x, incx)
STPMV
subroutine stpt03(uplo, trans, diag, n, nrhs, ap, scale, cnorm, tscal, x, ldx, b, ldb, work, resid)
STPT03