114 SUBROUTINE chpt01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
129 COMPLEX A( * ), AFAC( * ), C( ldc, * )
136 parameter ( zero = 0.0e+0, one = 1.0e+0 )
138 parameter ( czero = ( 0.0e+0, 0.0e+0 ),
139 $ cone = ( 1.0e+0, 0.0e+0 ) )
142 INTEGER I, INFO, J, JC
147 REAL CLANHE, CLANHP, SLAMCH
148 EXTERNAL lsame, clanhe, clanhp, slamch
154 INTRINSIC aimag, real
167 eps = slamch(
'Epsilon' )
168 anorm = clanhp(
'1', uplo, n, a, rwork )
174 IF( lsame( uplo,
'U' ) )
THEN
176 IF( aimag( afac( jc ) ).NE.zero )
THEN
184 IF( aimag( afac( jc ) ).NE.zero )
THEN
194 CALL claset(
'Full', n, n, czero, cone, c, ldc )
198 CALL clavhp( uplo,
'Conjugate',
'Non-unit', n, n, afac, ipiv, c,
203 CALL clavhp( uplo,
'No transpose',
'Unit', n, n, afac, ipiv, c,
208 IF( lsame( uplo,
'U' ) )
THEN
212 c( i, j ) = c( i, j ) - a( jc+i )
214 c( j, j ) = c( j, j ) -
REAL( A( JC+J ) )
220 c( j, j ) = c( j, j ) -
REAL( A( JC ) )
222 c( i, j ) = c( i, j ) - a( jc+i-j )
230 resid = clanhe(
'1', uplo, n, c, ldc, rwork )
232 IF( anorm.LE.zero )
THEN
236 resid = ( ( resid /
REAL( N ) ) / anorm ) / eps
subroutine clavhp(UPLO, TRANS, DIAG, N, NRHS, A, IPIV, B, LDB, INFO)
CLAVHP
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 chpt01(UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID)
CHPT01