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
160 DOUBLE PRECISION DLAMCH, ZLANGE, ZLANHE
161 EXTERNAL lsame, dlamch, zlange, zlanhe
167 INTRINSIC dble, dconjg
181 eps = dlamch(
'Epsilon' )
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 )
subroutine zpot03(UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK, RCOND, RESID)
ZPOT03
subroutine zhemm(SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
ZHEMM