124 $ LDC, RWORK, RESID )
132 INTEGER LDA, LDAFAC, LDC, N
133 DOUBLE PRECISION RESID
137 DOUBLE PRECISION RWORK( * )
138 COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * )
144 DOUBLE PRECISION ZERO, ONE
145 parameter( zero = 0.0d+0, one = 1.0d+0 )
146 COMPLEX*16 CZERO, CONE
147 parameter( czero = ( 0.0d+0, 0.0d+0 ),
148 $ cone = ( 1.0d+0, 0.0d+0 ) )
152 DOUBLE PRECISION ANORM, EPS
156 DOUBLE PRECISION DLAMCH, ZLANSY
157 EXTERNAL lsame, dlamch, zlansy
176 eps = dlamch(
'Epsilon' )
177 anorm = zlansy(
'1', uplo, n, a, lda, rwork )
181 CALL zlaset(
'Full', n, n, czero, cone, c, ldc )
185 CALL zlavsy_rook( uplo,
'Transpose',
'Non-unit', n, n, afac,
186 $ ldafac, ipiv, c, ldc, info )
190 CALL zlavsy_rook( uplo,
'No transpose',
'Unit', n, n, afac,
191 $ ldafac, ipiv, c, ldc, info )
195 IF( lsame( uplo,
'U' ) )
THEN
198 c( i, j ) = c( i, j ) - a( i, j )
204 c( i, j ) = c( i, j ) - a( i, j )
211 resid = zlansy(
'1', uplo, n, c, ldc, rwork )
213 IF( anorm.LE.zero )
THEN
217 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 zlavsy_rook(uplo, trans, diag, n, nrhs, a, lda, ipiv, b, ldb, info)
ZLAVSY_ROOK
subroutine zsyt01_rook(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
ZSYT01_ROOK