134 SUBROUTINE dpst01( UPLO, N, A, LDA, AFAC, LDAFAC, PERM, LDPERM,
135 $ piv, rwork, resid, rank )
143 DOUBLE PRECISION RESID
144 INTEGER LDA, LDAFAC, LDPERM, N, RANK
148 DOUBLE PRECISION A( lda, * ), AFAC( ldafac, * ),
149 $ perm( ldperm, * ), rwork( * )
156 DOUBLE PRECISION ZERO, ONE
157 parameter ( zero = 0.0d+0, one = 1.0d+0 )
160 DOUBLE PRECISION ANORM, EPS, T
164 DOUBLE PRECISION DDOT, DLAMCH, DLANSY
166 EXTERNAL ddot, dlamch, dlansy, lsame
185 eps = dlamch(
'Epsilon' )
186 anorm = dlansy(
'1', uplo, n, a, lda, rwork )
187 IF( anorm.LE.zero )
THEN
194 IF( lsame( uplo,
'U' ) )
THEN
197 DO 110 j = rank + 1, n
198 DO 100 i = rank + 1, j
208 t = ddot( k, afac( 1, k ), 1, afac( 1, k ), 1 )
213 CALL dtrmv(
'Upper',
'Transpose',
'Non-unit', k-1, afac,
214 $ ldafac, afac( 1, k ), 1 )
223 DO 140 j = rank + 1, n
235 $
CALL dsyr(
'Lower', n-k, one, afac( k+1, k ), 1,
236 $ afac( k+1, k+1 ), ldafac )
241 CALL dscal( n-k+1, t, afac( k, k ), 1 )
248 IF( lsame( uplo,
'U' ) )
THEN
252 IF( piv( i ).LE.piv( j ) )
THEN
254 perm( piv( i ), piv( j ) ) = afac( i, j )
256 perm( piv( i ), piv( j ) ) = afac( j, i )
267 IF( piv( i ).GE.piv( j ) )
THEN
269 perm( piv( i ), piv( j ) ) = afac( i, j )
271 perm( piv( i ), piv( j ) ) = afac( j, i )
281 IF( lsame( uplo,
'U' ) )
THEN
284 perm( i, j ) = perm( i, j ) - a( i, j )
290 perm( i, j ) = perm( i, j ) - a( i, j )
298 resid = dlansy(
'1', uplo, n, perm, ldafac, rwork )
300 resid = ( ( resid / dble( n ) ) / anorm ) / eps
subroutine dpst01(UPLO, N, A, LDA, AFAC, LDAFAC, PERM, LDPERM, PIV, RWORK, RESID, RANK)
DPST01
subroutine dsyr(UPLO, N, ALPHA, X, INCX, A, LDA)
DSYR
subroutine dscal(N, DA, DX, INCX)
DSCAL
subroutine dtrmv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
DTRMV