124 $ LDC, RWORK, RESID )
132 INTEGER LDA, LDAFAC, LDC, N
133 DOUBLE PRECISION RESID
137 DOUBLE PRECISION RWORK( * )
138 COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * )
144 DOUBLE PRECISION ZERO, ONE
145 parameter( zero = 0.0d+0, one = 1.0d+0 )
146 COMPLEX*16 CZERO, CONE
147 parameter( czero = ( 0.0d+0, 0.0d+0 ),
148 $ cone = ( 1.0d+0, 0.0d+0 ) )
152 DOUBLE PRECISION ANORM, EPS
156 DOUBLE PRECISION ZLANHE, DLAMCH
157 EXTERNAL lsame, zlanhe, dlamch
163 INTRINSIC dimag, dble
176 eps = dlamch(
'Epsilon' )
177 anorm = zlanhe(
'1', uplo, n, a, lda, rwork )
183 IF( dimag( afac( j, j ) ).NE.zero )
THEN
191 CALL zlaset(
'Full', n, n, czero, cone, c, ldc )
195 CALL zlavhe_rook( uplo,
'Conjugate',
'Non-unit', n, n, afac,
196 $ ldafac, ipiv, c, ldc, info )
200 CALL zlavhe_rook( uplo,
'No transpose',
'Unit', n, n, afac,
201 $ ldafac, ipiv, c, ldc, info )
205 IF( lsame( uplo,
'U' ) )
THEN
208 c( i, j ) = c( i, j ) - a( i, j )
210 c( j, j ) = c( j, j ) - dble( a( j, j ) )
214 c( j, j ) = c( j, j ) - dble( a( j, j ) )
216 c( i, j ) = c( i, j ) - a( i, j )
223 resid = zlanhe(
'1', uplo, n, c, ldc, rwork )
225 IF( anorm.LE.zero )
THEN
229 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 zhet01_rook(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
ZHET01_ROOK
subroutine zlavhe_rook(uplo, trans, diag, n, nrhs, a, lda, ipiv, b, ldb, info)
ZLAVHE_ROOK