112 SUBROUTINE zhpt01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
121 DOUBLE PRECISION RESID
125 DOUBLE PRECISION RWORK( * )
126 COMPLEX*16 A( * ), AFAC( * ), C( LDC, * )
132 DOUBLE PRECISION ZERO, ONE
133 parameter( zero = 0.0d+0, one = 1.0d+0 )
134 COMPLEX*16 CZERO, CONE
135 parameter( czero = ( 0.0d+0, 0.0d+0 ),
136 $ cone = ( 1.0d+0, 0.0d+0 ) )
139 INTEGER I, INFO, J, JC
140 DOUBLE PRECISION ANORM, EPS
144 DOUBLE PRECISION DLAMCH, ZLANHE, ZLANHP
145 EXTERNAL lsame, dlamch, zlanhe, zlanhp
151 INTRINSIC dble, dimag
164 eps = dlamch(
'Epsilon' )
165 anorm = zlanhp(
'1', uplo, n, a, rwork )
171 IF( lsame( uplo,
'U' ) )
THEN
173 IF( dimag( afac( jc ) ).NE.zero )
THEN
181 IF( dimag( afac( jc ) ).NE.zero )
THEN
191 CALL zlaset(
'Full', n, n, czero, cone, c, ldc )
195 CALL zlavhp( uplo,
'Conjugate',
'Non-unit', n, n, afac, ipiv, c,
200 CALL zlavhp( uplo,
'No transpose',
'Unit', n, n, afac, ipiv, c,
205 IF( lsame( uplo,
'U' ) )
THEN
209 c( i, j ) = c( i, j ) - a( jc+i )
211 c( j, j ) = c( j, j ) - dble( a( jc+j ) )
217 c( j, j ) = c( j, j ) - dble( a( jc ) )
219 c( i, j ) = c( i, j ) - a( jc+i-j )
227 resid = zlanhe(
'1', uplo, n, c, ldc, rwork )
229 IF( anorm.LE.zero )
THEN
233 resid = ( ( resid / dble( n ) ) / anorm ) / eps
subroutine zlaset(uplo, m, n, alpha, beta, a, lda)
ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine zhpt01(uplo, n, a, afac, ipiv, c, ldc, rwork, resid)
ZHPT01
subroutine zlavhp(uplo, trans, diag, n, nrhs, a, ipiv, b, ldb, info)
ZLAVHP