132 SUBROUTINE dpst01( UPLO, N, A, LDA, AFAC, LDAFAC, PERM, LDPERM,
133 $ PIV, RWORK, RESID, RANK )
140 DOUBLE PRECISION RESID
141 INTEGER LDA, LDAFAC, LDPERM, N, RANK
145 DOUBLE PRECISION A( LDA, * ), AFAC( LDAFAC, * ),
146 $ perm( ldperm, * ), rwork( * )
153 DOUBLE PRECISION ZERO, ONE
154 parameter( zero = 0.0d+0, one = 1.0d+0 )
157 DOUBLE PRECISION ANORM, EPS, T
161 DOUBLE PRECISION DDOT, DLAMCH, DLANSY
163 EXTERNAL ddot, dlamch, dlansy, lsame
182 eps = dlamch(
'Epsilon' )
183 anorm = dlansy(
'1', uplo, n, a, lda, rwork )
184 IF( anorm.LE.zero )
THEN
191 IF( lsame( uplo,
'U' ) )
THEN
194 DO 110 j = rank + 1, n
195 DO 100 i = rank + 1, j
205 t = ddot( k, afac( 1, k ), 1, afac( 1, k ), 1 )
210 CALL dtrmv(
'Upper',
'Transpose',
'Non-unit', k-1, afac,
211 $ ldafac, afac( 1, k ), 1 )
220 DO 140 j = rank + 1, n
232 $
CALL dsyr(
'Lower', n-k, one, afac( k+1, k ), 1,
233 $ afac( k+1, k+1 ), ldafac )
238 CALL dscal( n-k+1, t, afac( k, k ), 1 )
245 IF( lsame( uplo,
'U' ) )
THEN
249 IF( piv( i ).LE.piv( j ) )
THEN
251 perm( piv( i ), piv( j ) ) = afac( i, j )
253 perm( piv( i ), piv( j ) ) = afac( j, i )
264 IF( piv( i ).GE.piv( j ) )
THEN
266 perm( piv( i ), piv( j ) ) = afac( i, j )
268 perm( piv( i ), piv( j ) ) = afac( j, i )
278 IF( lsame( uplo,
'U' ) )
THEN
281 perm( i, j ) = perm( i, j ) - a( i, j )
287 perm( i, j ) = perm( i, j ) - a( i, j )
295 resid = dlansy(
'1', uplo, n, perm, ldafac, rwork )
297 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