126 SUBROUTINE chet01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
136 INTEGER lda, ldafac, ldc, n
142 COMPLEX a( lda, * ), afac( ldafac, * ), c( ldc, * )
149 parameter( zero = 0.0e+0, one = 1.0e+0 )
151 parameter( czero = ( 0.0e+0, 0.0e+0 ),
152 $ cone = ( 1.0e+0, 0.0e+0 ) )
167 INTRINSIC aimag, real
181 anorm =
clanhe(
'1', uplo, n, a, lda, rwork )
187 IF( aimag( afac( j, j ) ).NE.zero )
THEN
195 CALL
claset(
'Full', n, n, czero, cone, c, ldc )
199 CALL
clavhe( uplo,
'Conjugate',
'Non-unit', n, n, afac, ldafac,
200 $ ipiv, c, ldc, info )
204 CALL
clavhe( 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 ) -
REAL( A( J, J ) )
218 c( j, j ) = c( j, j ) -
REAL( A( J, J ) )
220 c( i, j ) = c( i, j ) - a( i, j )
227 resid =
clanhe(
'1', uplo, n, c, ldc, rwork )
229 IF( anorm.LE.zero )
THEN
233 resid = ( ( resid /
REAL( N ) ) / anorm ) / eps