105 SUBROUTINE cpot01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
113 INTEGER LDA, LDAFAC, N
118 COMPLEX A( LDA, * ), AFAC( LDAFAC, * )
125 parameter( zero = 0.0e+0, one = 1.0e+0 )
136 EXTERNAL lsame, clanhe, slamch, cdotc
142 INTRINSIC aimag, real
155 eps = slamch(
'Epsilon' )
156 anorm = clanhe(
'1', uplo, n, a, lda, rwork )
157 IF( anorm.LE.zero )
THEN
166 IF( aimag( afac( j, j ) ).NE.zero )
THEN
174 IF( lsame( uplo,
'U' ) )
THEN
179 tr = real( cdotc( k, afac( 1, k ), 1, afac( 1, k ), 1 ) )
184 CALL ctrmv(
'Upper',
'Conjugate',
'Non-unit', k-1, afac,
185 $ ldafac, afac( 1, k ), 1 )
198 $
CALL cher(
'Lower', n-k, one, afac( k+1, k ), 1,
199 $ afac( k+1, k+1 ), ldafac )
204 CALL cscal( n-k+1, tc, afac( k, k ), 1 )
211 IF( lsame( uplo,
'U' ) )
THEN
214 afac( i, j ) = afac( i, j ) - a( i, j )
216 afac( j, j ) = afac( j, j ) - real( a( j, j ) )
220 afac( j, j ) = afac( j, j ) - real( a( j, j ) )
222 afac( i, j ) = afac( i, j ) - a( i, j )
229 resid = clanhe(
'1', uplo, n, afac, ldafac, rwork )
231 resid = ( ( resid / real( n ) ) / anorm ) / eps
subroutine cpot01(uplo, n, a, lda, afac, ldafac, rwork, resid)
CPOT01
subroutine cher(uplo, n, alpha, x, incx, a, lda)
CHER
subroutine cscal(n, ca, cx, incx)
CSCAL
subroutine ctrmv(uplo, trans, diag, n, a, lda, x, incx)
CTRMV