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
147 DOUBLE PRECISION DLAMCH, ZLANHE, ZLANHP
148 EXTERNAL lsame, dlamch, zlanhe, zlanhp
154 INTRINSIC dble, dimag
167 eps = dlamch(
'Epsilon' )
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
subroutine zlaset(UPLO, M, N, ALPHA, BETA, A, LDA)
ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...
subroutine zlavhp(UPLO, TRANS, DIAG, N, NRHS, A, IPIV, B, LDB, INFO)
ZLAVHP
subroutine zhpt01(UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID)
ZHPT01