105 SUBROUTINE dpot01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
114 INTEGER lda, ldafac, n
115 DOUBLE PRECISION resid
118 DOUBLE PRECISION a( lda, * ), afac( ldafac, * ), rwork( * )
124 DOUBLE PRECISION zero, one
125 parameter( zero = 0.0d+0, one = 1.0d+0 )
129 DOUBLE PRECISION anorm, eps, t
154 anorm =
dlansy(
'1', uplo, n, a, lda, rwork )
155 IF( anorm.LE.zero )
THEN
162 IF(
lsame( uplo,
'U' ) )
THEN
167 t =
ddot( k, afac( 1, k ), 1, afac( 1, k ), 1 )
172 CALL
dtrmv(
'Upper',
'Transpose',
'Non-unit', k-1, afac,
173 $ ldafac, afac( 1, k ), 1 )
186 $ CALL
dsyr(
'Lower', n-k, one, afac( k+1, k ), 1,
187 $ afac( k+1, k+1 ), ldafac )
192 CALL
dscal( n-k+1, t, afac( k, k ), 1 )
199 IF(
lsame( uplo,
'U' ) )
THEN
202 afac( i, j ) = afac( i, j ) - a( i, j )
208 afac( i, j ) = afac( i, j ) - a( i, j )
215 resid =
dlansy(
'1', uplo, n, afac, ldafac, rwork )
217 resid = ( ( resid / dble( n ) ) / anorm ) / eps