107 SUBROUTINE cpot01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
116 INTEGER LDA, LDAFAC, N
121 COMPLEX A( lda, * ), AFAC( ldafac, * )
128 parameter ( zero = 0.0e+0, one = 1.0e+0 )
139 EXTERNAL lsame, clanhe, slamch, cdotc
145 INTRINSIC aimag, real
158 eps = slamch(
'Epsilon' )
159 anorm = clanhe(
'1', uplo, n, a, lda, rwork )
160 IF( anorm.LE.zero )
THEN
169 IF( aimag( afac( j, j ) ).NE.zero )
THEN
177 IF( lsame( uplo,
'U' ) )
THEN
182 tr = cdotc( k, afac( 1, k ), 1, afac( 1, k ), 1 )
187 CALL ctrmv(
'Upper',
'Conjugate',
'Non-unit', k-1, afac,
188 $ ldafac, afac( 1, k ), 1 )
201 $
CALL cher(
'Lower', n-k, one, afac( k+1, k ), 1,
202 $ afac( k+1, k+1 ), ldafac )
207 CALL cscal( n-k+1, tc, afac( k, k ), 1 )
214 IF( lsame( uplo,
'U' ) )
THEN
217 afac( i, j ) = afac( i, j ) - a( i, j )
219 afac( j, j ) = afac( j, j ) -
REAL( A( J, J ) )
223 afac( j, j ) = afac( j, j ) -
REAL( A( J, J ) )
225 afac( i, j ) = afac( i, j ) - a( i, j )
232 resid = clanhe(
'1', uplo, n, afac, ldafac, rwork )
234 resid = ( ( resid /
REAL( N ) ) / anorm ) / eps
subroutine cher(UPLO, N, ALPHA, X, INCX, A, LDA)
CHER
subroutine cpot01(UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID)
CPOT01
subroutine cscal(N, CA, CX, INCX)
CSCAL
subroutine ctrmv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
CTRMV