103 SUBROUTINE dpot01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
111 INTEGER LDA, LDAFAC, N
112 DOUBLE PRECISION RESID
115 DOUBLE PRECISION A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
121 DOUBLE PRECISION ZERO, ONE
122 parameter( zero = 0.0d+0, one = 1.0d+0 )
126 DOUBLE PRECISION ANORM, EPS, T
130 DOUBLE PRECISION DDOT, DLAMCH, DLANSY
131 EXTERNAL lsame, ddot, dlamch, dlansy
150 eps = dlamch(
'Epsilon' )
151 anorm = dlansy(
'1', uplo, n, a, lda, rwork )
152 IF( anorm.LE.zero )
THEN
159 IF( lsame( uplo,
'U' ) )
THEN
164 t = ddot( k, afac( 1, k ), 1, afac( 1, k ), 1 )
169 CALL dtrmv(
'Upper',
'Transpose',
'Non-unit', k-1, afac,
170 $ ldafac, afac( 1, k ), 1 )
183 $
CALL dsyr(
'Lower', n-k, one, afac( k+1, k ), 1,
184 $ afac( k+1, k+1 ), ldafac )
189 CALL dscal( n-k+1, t, afac( k, k ), 1 )
196 IF( lsame( uplo,
'U' ) )
THEN
199 afac( i, j ) = afac( i, j ) - a( i, j )
205 afac( i, j ) = afac( i, j ) - a( i, j )
212 resid = dlansy(
'1', uplo, n, afac, ldafac, rwork )
214 resid = ( ( resid / dble( n ) ) / anorm ) / eps
subroutine dpot01(uplo, n, a, lda, afac, ldafac, rwork, resid)
DPOT01
subroutine dsyr(uplo, n, alpha, x, incx, a, lda)
DSYR
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine dtrmv(uplo, trans, diag, n, a, lda, x, incx)
DTRMV