107 SUBROUTINE zpot01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
116 INTEGER LDA, LDAFAC, N
117 DOUBLE PRECISION RESID
120 DOUBLE PRECISION RWORK( * )
121 COMPLEX*16 A( lda, * ), AFAC( ldafac, * )
127 DOUBLE PRECISION ZERO, ONE
128 parameter ( zero = 0.0d+0, one = 1.0d+0 )
132 DOUBLE PRECISION ANORM, EPS, TR
137 DOUBLE PRECISION DLAMCH, ZLANHE
139 EXTERNAL lsame, dlamch, zlanhe, zdotc
145 INTRINSIC dble, dimag
158 eps = dlamch(
'Epsilon' )
159 anorm = zlanhe(
'1', uplo, n, a, lda, rwork )
160 IF( anorm.LE.zero )
THEN
169 IF( dimag( afac( j, j ) ).NE.zero )
THEN
177 IF( lsame( uplo,
'U' ) )
THEN
182 tr = zdotc( k, afac( 1, k ), 1, afac( 1, k ), 1 )
187 CALL ztrmv(
'Upper',
'Conjugate',
'Non-unit', k-1, afac,
188 $ ldafac, afac( 1, k ), 1 )
201 $
CALL zher(
'Lower', n-k, one, afac( k+1, k ), 1,
202 $ afac( k+1, k+1 ), ldafac )
207 CALL zscal( 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 ) - dble( a( j, j ) )
223 afac( j, j ) = afac( j, j ) - dble( a( j, j ) )
225 afac( i, j ) = afac( i, j ) - a( i, j )
232 resid = zlanhe(
'1', uplo, n, afac, ldafac, rwork )
234 resid = ( ( resid / dble( n ) ) / anorm ) / eps
subroutine zher(UPLO, N, ALPHA, X, INCX, A, LDA)
ZHER
subroutine zpot01(UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID)
ZPOT01
subroutine ztrmv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
ZTRMV
subroutine zscal(N, ZA, ZX, INCX)
ZSCAL