121 SUBROUTINE zppt02( UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK,
130 INTEGER LDB, LDX, N, NRHS
131 DOUBLE PRECISION RESID
134 DOUBLE PRECISION RWORK( * )
135 COMPLEX*16 A( * ), B( LDB, * ), X( LDX, * )
141 DOUBLE PRECISION ZERO, ONE
142 parameter( zero = 0.0d+0, one = 1.0d+0 )
144 parameter( cone = ( 1.0d+0, 0.0d+0 ) )
148 DOUBLE PRECISION ANORM, BNORM, EPS, XNORM
151 DOUBLE PRECISION DLAMCH, DZASUM, ZLANHP
152 EXTERNAL dlamch, dzasum, zlanhp
164 IF( n.LE.0 .OR. nrhs.LE.0 )
THEN
171 eps = dlamch(
'Epsilon' )
172 anorm = zlanhp(
'1', uplo, n, a, rwork )
173 IF( anorm.LE.zero )
THEN
181 CALL zhpmv( uplo, n, -cone, a, x( 1, j ), 1, cone, b( 1, j ),
190 bnorm = dzasum( n, b( 1, j ), 1 )
191 xnorm = dzasum( n, x( 1, j ), 1 )
192 IF( xnorm.LE.zero )
THEN
195 resid = max( resid, ( ( bnorm / anorm ) / xnorm ) / eps )
subroutine zhpmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
ZHPMV
subroutine zppt02(uplo, n, nrhs, a, x, ldx, b, ldb, rwork, resid)
ZPPT02