125 SUBROUTINE dpot03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
126 $ rwork, rcond, resid )
135 INTEGER lda, ldainv, ldwork, n
136 DOUBLE PRECISION rcond, resid
139 DOUBLE PRECISION a( lda, * ), ainv( ldainv, * ), rwork( * ),
146 DOUBLE PRECISION zero, one
147 parameter( zero = 0.0d+0, one = 1.0d+0 )
151 DOUBLE PRECISION ainvnm, anorm, eps
177 anorm =
dlansy(
'1', uplo, n, a, lda, rwork )
178 ainvnm =
dlansy(
'1', uplo, n, ainv, ldainv, rwork )
179 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
184 rcond = ( one / anorm ) / ainvnm
189 IF(
lsame( uplo,
'U' ) )
THEN
192 ainv(
j, i ) = ainv( i,
j )
198 ainv(
j, i ) = ainv( i,
j )
202 CALL
dsymm(
'Left', uplo, n, n, -one, a, lda, ainv, ldainv, zero,
208 work( i, i ) = work( i, i ) + one
213 resid =
dlange(
'1', n, n, work, ldwork, rwork )
215 resid = ( ( resid*rcond ) / eps ) / dble( n )
subroutine dsymm(SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
DSYMM
logical function lsame(CA, CB)
LSAME
double precision function dlange(NORM, M, N, A, LDA, WORK)
DLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
subroutine dpot03(UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK, RCOND, RESID)
DPOT03
double precision function dlamch(CMACH)
DLAMCH
set ue cd $ADTTMP cat<< EOF > tmp f Program LinearEquations Implicit none Real j
double precision function dlansy(NORM, UPLO, N, A, LDA, WORK)
DLANSY returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a real symmetric matrix.