124 SUBROUTINE zhet01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
133 INTEGER LDA, LDAFAC, LDC, N
134 DOUBLE PRECISION RESID
138 DOUBLE PRECISION RWORK( * )
139 COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * )
145 DOUBLE PRECISION ZERO, ONE
146 parameter( zero = 0.0d+0, one = 1.0d+0 )
147 COMPLEX*16 CZERO, CONE
148 parameter( czero = ( 0.0d+0, 0.0d+0 ),
149 $ cone = ( 1.0d+0, 0.0d+0 ) )
153 DOUBLE PRECISION ANORM, EPS
157 DOUBLE PRECISION DLAMCH, ZLANHE
158 EXTERNAL lsame, dlamch, zlanhe
164 INTRINSIC dble, dimag
177 eps = dlamch(
'Epsilon' )
178 anorm = zlanhe(
'1', uplo, n, a, lda, rwork )
184 IF( dimag( afac( j, j ) ).NE.zero )
THEN
192 CALL zlaset(
'Full', n, n, czero, cone, c, ldc )
196 CALL zlavhe( uplo,
'Conjugate',
'Non-unit', n, n, afac, ldafac,
197 $ ipiv, c, ldc, info )
201 CALL zlavhe( uplo,
'No transpose',
'Unit', n, n, afac, ldafac,
202 $ ipiv, c, ldc, info )
206 IF( lsame( uplo,
'U' ) )
THEN
209 c( i, j ) = c( i, j ) - a( i, j )
211 c( j, j ) = c( j, j ) - dble( a( j, j ) )
215 c( j, j ) = c( j, j ) - dble( a( j, j ) )
217 c( i, j ) = c( i, j ) - a( i, j )
224 resid = zlanhe(
'1', uplo, n, c, ldc, rwork )
226 IF( anorm.LE.zero )
THEN
230 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 zhet01(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
ZHET01
subroutine zlavhe(uplo, trans, diag, n, nrhs, a, lda, ipiv, b, ldb, info)
ZLAVHE