111 SUBROUTINE zspt01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
120 DOUBLE PRECISION RESID
124 DOUBLE PRECISION RWORK( * )
125 COMPLEX*16 A( * ), AFAC( * ), C( LDC, * )
131 DOUBLE PRECISION ZERO, ONE
132 parameter( zero = 0.0d+0, one = 1.0d+0 )
133 COMPLEX*16 CZERO, CONE
134 parameter( czero = ( 0.0d+0, 0.0d+0 ),
135 $ cone = ( 1.0d+0, 0.0d+0 ) )
138 INTEGER I, INFO, J, JC
139 DOUBLE PRECISION ANORM, EPS
143 DOUBLE PRECISION DLAMCH, ZLANSP, ZLANSY
144 EXTERNAL lsame, dlamch, zlansp, zlansy
163 eps = dlamch(
'Epsilon' )
164 anorm = zlansp(
'1', uplo, n, a, rwork )
168 CALL zlaset(
'Full', n, n, czero, cone, c, ldc )
172 CALL zlavsp( uplo,
'Transpose',
'Non-unit', n, n, afac, ipiv, c,
177 CALL zlavsp( uplo,
'No transpose',
'Unit', n, n, afac, ipiv, c,
182 IF( lsame( uplo,
'U' ) )
THEN
186 c( i, j ) = c( i, j ) - a( jc+i )
194 c( i, j ) = c( i, j ) - a( jc+i-j )
202 resid = zlansy(
'1', uplo, n, c, ldc, rwork )
204 IF( anorm.LE.zero )
THEN
208 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 zlavsp(uplo, trans, diag, n, nrhs, a, ipiv, b, ldb, info)
ZLAVSP
subroutine zspt01(uplo, n, a, afac, ipiv, c, ldc, rwork, resid)
ZSPT01