141 SUBROUTINE dtpt02( UPLO, TRANS, DIAG, N, NRHS, AP, X, LDX, B, LDB,
150 CHARACTER diag, trans, uplo
151 INTEGER ldb, ldx, n, nrhs
152 DOUBLE PRECISION resid
155 DOUBLE PRECISION ap( * ), b( ldb, * ), work( * ), x( ldx, * )
161 DOUBLE PRECISION zero, one
162 parameter( zero = 0.0d+0, one = 1.0d+0 )
166 DOUBLE PRECISION anorm, bnorm, eps, xnorm
183 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
190 IF(
lsame( trans,
'N' ) )
THEN
191 anorm =
dlantp(
'1', uplo, diag, n, ap, work )
193 anorm =
dlantp(
'I', uplo, diag, n, ap, work )
199 IF( anorm.LE.zero )
THEN
209 CALL
dcopy( n, x( 1, j ), 1, work, 1 )
210 CALL
dtpmv( uplo, trans, diag, n, ap, work, 1 )
211 CALL
daxpy( n, -one, b( 1, j ), 1, work, 1 )
212 bnorm =
dasum( n, work, 1 )
213 xnorm =
dasum( n, x( 1, j ), 1 )
214 IF( xnorm.LE.zero )
THEN
217 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )