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
167 INTRINSIC conjg, real
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 )