126 SUBROUTINE zhet01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
136 INTEGER lda, ldafac, ldc, n
137 DOUBLE PRECISION resid
141 DOUBLE PRECISION rwork( * )
142 COMPLEX*16 a( lda, * ), afac( ldafac, * ), c( ldc, * )
148 DOUBLE PRECISION zero, one
149 parameter( zero = 0.0d+0, one = 1.0d+0 )
150 COMPLEX*16 czero, cone
151 parameter( czero = ( 0.0d+0, 0.0d+0 ),
152 $ cone = ( 1.0d+0, 0.0d+0 ) )
156 DOUBLE PRECISION anorm, eps
167 INTRINSIC dble, dimag
181 anorm =
zlanhe(
'1', uplo, n, a, lda, rwork )
187 IF( dimag( afac( j, j ) ).NE.zero )
THEN
195 CALL
zlaset(
'Full', n, n, czero, cone, c, ldc )
199 CALL
zlavhe( uplo,
'Conjugate',
'Non-unit', n, n, afac, ldafac,
200 $ ipiv, c, ldc, info )
204 CALL
zlavhe( uplo,
'No transpose',
'Unit', n, n, afac, ldafac,
205 $ ipiv, c, ldc, info )
209 IF(
lsame( uplo,
'U' ) )
THEN
212 c( i, j ) = c( i, j ) - a( i, j )
214 c( j, j ) = c( j, j ) - dble( a( j, j ) )
218 c( j, j ) = c( j, j ) - dble( a( j, j ) )
220 c( i, j ) = c( i, j ) - a( i, j )
227 resid =
zlanhe(
'1', uplo, n, c, ldc, rwork )
229 IF( anorm.LE.zero )
THEN
233 resid = ( ( resid / dble( n ) ) / anorm ) / eps