94 SUBROUTINE zppt01( UPLO, N, A, AFAC, RWORK, RESID )
103 DOUBLE PRECISION RESID
106 DOUBLE PRECISION RWORK( * )
107 COMPLEX*16 A( * ), AFAC( * )
113 DOUBLE PRECISION ZERO, ONE
114 parameter( zero = 0.0d+0, one = 1.0d+0 )
118 DOUBLE PRECISION ANORM, EPS, TR
123 DOUBLE PRECISION DLAMCH, ZLANHP
125 EXTERNAL lsame, dlamch, zlanhp, zdotc
131 INTRINSIC dble, dimag
144 eps = dlamch(
'Epsilon' )
145 anorm = zlanhp(
'1', uplo, n, a, rwork )
146 IF( anorm.LE.zero )
THEN
155 IF( lsame( uplo,
'U' ) )
THEN
157 IF( dimag( afac( kc ) ).NE.zero )
THEN
165 IF( dimag( afac( kc ) ).NE.zero )
THEN
175 IF( lsame( uplo,
'U' ) )
THEN
176 kc = ( n*( n-1 ) ) / 2 + 1
181 tr = dble( zdotc( k, afac( kc ), 1, afac( kc ), 1 ) )
187 CALL ztpmv(
'Upper',
'Conjugate',
'Non-unit', k-1, afac,
198 afac( kc+i-1 ) = afac( kc+i-1 ) - a( kc+i-1 )
200 afac( kc+k-1 ) = afac( kc+k-1 ) - dble( a( kc+k-1 ) )
207 kc = ( n*( n+1 ) ) / 2
214 $
CALL zhpr(
'Lower', n-k, one, afac( kc+1 ), 1,
220 CALL zscal( n-k+1, tc, afac( kc ), 1 )
229 afac( kc ) = afac( kc ) - dble( a( kc ) )
231 afac( kc+i-k ) = afac( kc+i-k ) - a( kc+i-k )
239 resid = zlanhp(
'1', uplo, n, afac, rwork )
241 resid = ( ( resid / dble( n ) ) / anorm ) / eps
subroutine zhpr(uplo, n, alpha, x, incx, ap)
ZHPR
subroutine zscal(n, za, zx, incx)
ZSCAL
subroutine ztpmv(uplo, trans, diag, n, ap, x, incx)
ZTPMV
subroutine zppt01(uplo, n, a, afac, rwork, resid)
ZPPT01