114 SUBROUTINE zhpt01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
124 DOUBLE PRECISION resid
128 DOUBLE PRECISION rwork( * )
129 COMPLEX*16 a( * ), afac( * ), c( ldc, * )
135 DOUBLE PRECISION zero, one
136 parameter( zero = 0.0d+0, one = 1.0d+0 )
137 COMPLEX*16 czero, cone
138 parameter( czero = ( 0.0d+0, 0.0d+0 ),
139 $ cone = ( 1.0d+0, 0.0d+0 ) )
142 INTEGER i, info, j, jc
143 DOUBLE PRECISION anorm, eps
154 INTRINSIC dble, dimag
168 anorm =
zlanhp(
'1', uplo, n, a, rwork )
174 IF(
lsame( uplo,
'U' ) )
THEN
176 IF( dimag( afac( jc ) ).NE.zero )
THEN
184 IF( dimag( afac( jc ) ).NE.zero )
THEN
194 CALL
zlaset(
'Full', n, n, czero, cone, c, ldc )
198 CALL
zlavhp( uplo,
'Conjugate',
'Non-unit', n, n, afac, ipiv, c,
203 CALL
zlavhp( uplo,
'No transpose',
'Unit', n, n, afac, ipiv, c,
208 IF(
lsame( uplo,
'U' ) )
THEN
212 c( i, j ) = c( i, j ) - a( jc+i )
214 c( j, j ) = c( j, j ) - dble( a( jc+j ) )
220 c( j, j ) = c( j, j ) - dble( a( jc ) )
222 c( i, j ) = c( i, j ) - a( jc+i-j )
230 resid =
zlanhe(
'1', uplo, n, c, ldc, rwork )
232 IF( anorm.LE.zero )
THEN
236 resid = ( ( resid / dble( n ) ) / anorm ) / eps