126 SUBROUTINE zpot03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
127 $ rwork, rcond, resid )
136 INTEGER lda, ldainv, ldwork, n
137 DOUBLE PRECISION rcond, resid
140 DOUBLE PRECISION rwork( * )
141 COMPLEX*16 a( lda, * ), ainv( ldainv, * ),
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 ainvnm, anorm, eps
167 INTRINSIC dble, dconjg
182 anorm =
zlanhe(
'1', uplo, n, a, lda, rwork )
183 ainvnm =
zlanhe(
'1', uplo, n, ainv, ldainv, rwork )
184 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
189 rcond = ( one / anorm ) / ainvnm
194 IF(
lsame( uplo,
'U' ) )
THEN
197 ainv( j, i ) = dconjg( ainv( i, j ) )
203 ainv( j, i ) = dconjg( ainv( i, j ) )
207 CALL
zhemm(
'Left', uplo, n, n, -cone, a, lda, ainv, ldainv,
208 $ czero, work, ldwork )
213 work( i, i ) = work( i, i ) + cone
218 resid =
zlange(
'1', n, n, work, ldwork, rwork )
220 resid = ( ( resid*rcond ) / eps ) / dble( n )