126 SUBROUTINE cpot03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
127 $ rwork, rcond, resid )
136 INTEGER LDA, LDAINV, LDWORK, N
141 COMPLEX A( lda, * ), AINV( ldainv, * ),
149 parameter ( zero = 0.0e+0, one = 1.0e+0 )
151 parameter ( czero = ( 0.0e+0, 0.0e+0 ),
152 $ cone = ( 1.0e+0, 0.0e+0 ) )
156 REAL AINVNM, ANORM, EPS
160 REAL CLANGE, CLANHE, SLAMCH
161 EXTERNAL lsame, clange, clanhe, slamch
167 INTRINSIC conjg, real
181 eps = slamch(
'Epsilon' )
182 anorm = clanhe(
'1', uplo, n, a, lda, rwork )
183 ainvnm = clanhe(
'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 ) = conjg( ainv( i, j ) )
203 ainv( j, i ) = conjg( ainv( i, j ) )
207 CALL chemm(
'Left', uplo, n, n, -cone, a, lda, ainv, ldainv,
208 $ czero, work, ldwork )
213 work( i, i ) = work( i, i ) + cone
218 resid = clange(
'1', n, n, work, ldwork, rwork )
220 resid = ( ( resid*rcond )/eps ) /
REAL( n )
subroutine chemm(SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
CHEMM
subroutine cpot03(UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK, RCOND, RESID)
CPOT03