124 SUBROUTINE cpot03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
125 $ RWORK, RCOND, RESID )
133 INTEGER LDA, LDAINV, LDWORK, N
138 COMPLEX A( LDA, * ), AINV( LDAINV, * ),
146 parameter( zero = 0.0e+0, one = 1.0e+0 )
148 parameter( czero = ( 0.0e+0, 0.0e+0 ),
149 $ cone = ( 1.0e+0, 0.0e+0 ) )
153 REAL AINVNM, ANORM, EPS
157 REAL CLANGE, CLANHE, SLAMCH
158 EXTERNAL lsame, clange, clanhe, slamch
164 INTRINSIC conjg, real
178 eps = slamch(
'Epsilon' )
179 anorm = clanhe(
'1', uplo, n, a, lda, rwork )
180 ainvnm = clanhe(
'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 ) = conjg( ainv( i, j ) )
200 ainv( j, i ) = conjg( ainv( i, j ) )
204 CALL chemm(
'Left', uplo, n, n, -cone, a, lda, ainv, ldainv,
205 $ czero, work, ldwork )
210 work( i, i ) = work( i, i ) + cone
215 resid = clange(
'1', n, n, work, ldwork, rwork )
217 resid = ( ( resid*rcond )/eps ) / real( n )
subroutine cpot03(uplo, n, a, lda, ainv, ldainv, work, ldwork, rwork, rcond, resid)
CPOT03
subroutine chemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc)
CHEMM