126 SUBROUTINE chet01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
136 INTEGER LDA, LDAFAC, LDC, N
142 COMPLEX A( lda, * ), AFAC( ldafac, * ), C( ldc, * )
149 parameter ( zero = 0.0e+0, one = 1.0e+0 )
151 parameter ( czero = ( 0.0e+0, 0.0e+0 ),
152 $ cone = ( 1.0e+0, 0.0e+0 ) )
161 EXTERNAL lsame, clanhe, slamch
167 INTRINSIC aimag, real
180 eps = slamch(
'Epsilon' )
181 anorm = clanhe(
'1', uplo, n, a, lda, rwork )
187 IF( aimag( afac( j, j ) ).NE.zero )
THEN
195 CALL claset(
'Full', n, n, czero, cone, c, ldc )
199 CALL clavhe( uplo,
'Conjugate',
'Non-unit', n, n, afac, ldafac,
200 $ ipiv, c, ldc, info )
204 CALL clavhe( uplo,
'No transpose',
'Unit', n, n, afac, ldafac,
205 $ ipiv, c, ldc, info )
209 IF( lsame( uplo,
'U' ) )
THEN
212 c( i, j ) = c( i, j ) - a( i, j )
214 c( j, j ) = c( j, j ) -
REAL( A( J, J ) )
218 c( j, j ) = c( j, j ) -
REAL( A( J, J ) )
220 c( i, j ) = c( i, j ) - a( i, j )
227 resid = clanhe(
'1', uplo, n, c, ldc, rwork )
229 IF( anorm.LE.zero )
THEN
233 resid = ( ( resid /
REAL( N ) ) / anorm ) / eps
subroutine claset(UPLO, M, N, ALPHA, BETA, A, LDA)
CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...
subroutine chet01(UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC, RWORK, RESID)
CHET01
subroutine clavhe(UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B, LDB, INFO)
CLAVHE