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 )
LOGICAL function lsame(CA, CB)
LSAME
REAL function clanhe(NORM, UPLO, N, A, LDA, WORK)
CLANHE returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a complex Hermitian matrix.
REAL function slamch(CMACH)
SLAMCH
subroutine cpot03(UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK, RCOND, RESID)
CPOT03
REAL function clange(NORM, M, N, A, LDA, WORK)
CLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
set ue cd $ADTTMP cat<< EOF > tmp f Program LinearEquations Implicit none Real j
subroutine chemm(SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
CHEMM