103 SUBROUTINE spot01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
111 INTEGER LDA, LDAFAC, N
115 REAL A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
122 parameter( zero = 0.0e+0, one = 1.0e+0 )
130 REAL SDOT, SLAMCH, SLANSY
131 EXTERNAL lsame, sdot, slamch, slansy
150 eps = slamch(
'Epsilon' )
151 anorm = slansy(
'1', uplo, n, a, lda, rwork )
152 IF( anorm.LE.zero )
THEN
159 IF( lsame( uplo,
'U' ) )
THEN
164 t = sdot( k, afac( 1, k ), 1, afac( 1, k ), 1 )
169 CALL strmv(
'Upper',
'Transpose',
'Non-unit', k-1, afac,
170 $ ldafac, afac( 1, k ), 1 )
183 $
CALL ssyr(
'Lower', n-k, one, afac( k+1, k ), 1,
184 $ afac( k+1, k+1 ), ldafac )
189 CALL sscal( n-k+1, t, afac( k, k ), 1 )
196 IF( lsame( uplo,
'U' ) )
THEN
199 afac( i, j ) = afac( i, j ) - a( i, j )
205 afac( i, j ) = afac( i, j ) - a( i, j )
212 resid = slansy(
'1', uplo, n, afac, ldafac, rwork )
214 resid = ( ( resid / real( n ) ) / anorm ) / eps
subroutine ssyr(uplo, n, alpha, x, incx, a, lda)
SSYR
subroutine sscal(n, sa, sx, incx)
SSCAL
subroutine strmv(uplo, trans, diag, n, a, lda, x, incx)
STRMV
subroutine spot01(uplo, n, a, lda, afac, ldafac, rwork, resid)
SPOT01