124 SUBROUTINE zpot03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
125 $ RWORK, RCOND, RESID )
133 INTEGER LDA, LDAINV, LDWORK, N
134 DOUBLE PRECISION RCOND, RESID
137 DOUBLE PRECISION RWORK( * )
138 COMPLEX*16 A( LDA, * ), AINV( LDAINV, * ),
145 DOUBLE PRECISION ZERO, ONE
146 parameter( zero = 0.0d+0, one = 1.0d+0 )
147 COMPLEX*16 CZERO, CONE
148 parameter( czero = ( 0.0d+0, 0.0d+0 ),
149 $ cone = ( 1.0d+0, 0.0d+0 ) )
153 DOUBLE PRECISION AINVNM, ANORM, EPS
157 DOUBLE PRECISION DLAMCH, ZLANGE, ZLANHE
158 EXTERNAL lsame, dlamch, zlange, zlanhe
164 INTRINSIC dble, dconjg
178 eps = dlamch(
'Epsilon' )
179 anorm = zlanhe(
'1', uplo, n, a, lda, rwork )
180 ainvnm = zlanhe(
'1', uplo, n, ainv, ldainv, rwork )
181 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
186 rcond = ( one / anorm ) / ainvnm
191 IF( lsame( uplo,
'U' ) )
THEN
194 ainv( j, i ) = dconjg( ainv( i, j ) )
200 ainv( j, i ) = dconjg( ainv( i, j ) )
204 CALL zhemm(
'Left', uplo, n, n, -cone, a, lda, ainv, ldainv,
205 $ czero, work, ldwork )
210 work( i, i ) = work( i, i ) + cone
215 resid = zlange(
'1', n, n, work, ldwork, rwork )
217 resid = ( ( resid*rcond ) / eps ) / dble( n )
subroutine zhemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc)
ZHEMM
subroutine zpot03(uplo, n, a, lda, ainv, ldainv, work, ldwork, rwork, rcond, resid)
ZPOT03