105 SUBROUTINE zpot01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
113 INTEGER LDA, LDAFAC, N
114 DOUBLE PRECISION RESID
117 DOUBLE PRECISION RWORK( * )
118 COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * )
124 DOUBLE PRECISION ZERO, ONE
125 parameter( zero = 0.0d+0, one = 1.0d+0 )
129 DOUBLE PRECISION ANORM, EPS, TR
134 DOUBLE PRECISION DLAMCH, ZLANHE
136 EXTERNAL lsame, dlamch, zlanhe, zdotc
142 INTRINSIC dble, dimag
155 eps = dlamch(
'Epsilon' )
156 anorm = zlanhe(
'1', uplo, n, a, lda, rwork )
157 IF( anorm.LE.zero )
THEN
166 IF( dimag( afac( j, j ) ).NE.zero )
THEN
174 IF( lsame( uplo,
'U' ) )
THEN
179 tr = dble( zdotc( k, afac( 1, k ), 1, afac( 1, k ), 1 ) )
184 CALL ztrmv(
'Upper',
'Conjugate',
'Non-unit', k-1, afac,
185 $ ldafac, afac( 1, k ), 1 )
198 $
CALL zher(
'Lower', n-k, one, afac( k+1, k ), 1,
199 $ afac( k+1, k+1 ), ldafac )
204 CALL zscal( 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 ) - dble( a( j, j ) )
220 afac( j, j ) = afac( j, j ) - dble( a( j, j ) )
222 afac( i, j ) = afac( i, j ) - a( i, j )
229 resid = zlanhe(
'1', uplo, n, afac, ldafac, rwork )
231 resid = ( ( resid / dble( n ) ) / anorm ) / eps
subroutine zher(uplo, n, alpha, x, incx, a, lda)
ZHER
subroutine zscal(n, za, zx, incx)
ZSCAL
subroutine ztrmv(uplo, trans, diag, n, a, lda, x, incx)
ZTRMV
subroutine zpot01(uplo, n, a, lda, afac, ldafac, rwork, resid)
ZPOT01