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
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