113 SUBROUTINE zspt01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
123 DOUBLE PRECISION RESID
127 DOUBLE PRECISION RWORK( * )
128 COMPLEX*16 A( * ), AFAC( * ), C( ldc, * )
134 DOUBLE PRECISION ZERO, ONE
135 parameter ( zero = 0.0d+0, one = 1.0d+0 )
136 COMPLEX*16 CZERO, CONE
137 parameter ( czero = ( 0.0d+0, 0.0d+0 ),
138 $ cone = ( 1.0d+0, 0.0d+0 ) )
141 INTEGER I, INFO, J, JC
142 DOUBLE PRECISION ANORM, EPS
146 DOUBLE PRECISION DLAMCH, ZLANSP, ZLANSY
147 EXTERNAL lsame, dlamch, zlansp, zlansy
166 eps = dlamch(
'Epsilon' )
167 anorm = zlansp(
'1', uplo, n, a, rwork )
171 CALL zlaset(
'Full', n, n, czero, cone, c, ldc )
175 CALL zlavsp( uplo,
'Transpose',
'Non-unit', n, n, afac, ipiv, c,
180 CALL zlavsp( uplo,
'No transpose',
'Unit', n, n, afac, ipiv, c,
185 IF( lsame( uplo,
'U' ) )
THEN
189 c( i, j ) = c( i, j ) - a( jc+i )
197 c( i, j ) = c( i, j ) - a( jc+i-j )
205 resid = zlansy(
'1', uplo, n, c, ldc, rwork )
207 IF( anorm.LE.zero )
THEN
211 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