140 SUBROUTINE stpt02( UPLO, TRANS, DIAG, N, NRHS, AP, X, LDX, B, LDB,
148 CHARACTER DIAG, TRANS, UPLO
149 INTEGER LDB, LDX, N, NRHS
153 REAL AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
160 parameter( zero = 0.0e+0, one = 1.0e+0 )
164 REAL ANORM, BNORM, EPS, XNORM
168 REAL SASUM, SLAMCH, SLANTP
169 EXTERNAL lsame, sasum, slamch, slantp
181 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
188 IF( lsame( trans,
'N' ) )
THEN
189 anorm = slantp(
'1', uplo, diag, n, ap, work )
191 anorm = slantp(
'I', uplo, diag, n, ap, work )
196 eps = slamch(
'Epsilon' )
197 IF( anorm.LE.zero )
THEN
207 CALL scopy( n, x( 1, j ), 1, work, 1 )
208 CALL stpmv( uplo, trans, diag, n, ap, work, 1 )
209 CALL saxpy( n, -one, b( 1, j ), 1, work, 1 )
210 bnorm = sasum( n, work, 1 )
211 xnorm = sasum( n, x( 1, j ), 1 )
212 IF( xnorm.LE.zero )
THEN
215 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine saxpy(n, sa, sx, incx, sy, incy)
SAXPY
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine stpmv(uplo, trans, diag, n, ap, x, incx)
STPMV
subroutine stpt02(uplo, trans, diag, n, nrhs, ap, x, ldx, b, ldb, work, resid)
STPT02