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
160 DOUBLE PRECISION DLAMCH, ZLANHE
161 EXTERNAL lsame, dlamch, zlanhe
167 INTRINSIC dble, dimag
180 eps = dlamch(
'Epsilon' )
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
subroutine zhet01(UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC, RWORK, RESID)
ZHET01
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 zlavhe(UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B, LDB, INFO)
ZLAVHE