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
133 DOUBLE PRECISION DDOT, DLAMCH, DLANSY
134 EXTERNAL lsame, ddot, dlamch, dlansy
153 eps = dlamch(
'Epsilon' )
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
subroutine dsyr(UPLO, N, ALPHA, X, INCX, A, LDA)
DSYR
subroutine dscal(N, DA, DX, INCX)
DSCAL
subroutine dpot01(UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID)
DPOT01
subroutine dtrmv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
DTRMV