109 SUBROUTINE dspt01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
118 DOUBLE PRECISION RESID
122 DOUBLE PRECISION A( * ), AFAC( * ), C( LDC, * ), RWORK( * )
128 DOUBLE PRECISION ZERO, ONE
129 parameter( zero = 0.0d+0, one = 1.0d+0 )
132 INTEGER I, INFO, J, JC
133 DOUBLE PRECISION ANORM, EPS
137 DOUBLE PRECISION DLAMCH, DLANSP, DLANSY
138 EXTERNAL lsame, dlamch, dlansp, dlansy
157 eps = dlamch(
'Epsilon' )
158 anorm = dlansp(
'1', uplo, n, a, rwork )
162 CALL dlaset(
'Full', n, n, zero, one, c, ldc )
166 CALL dlavsp( uplo,
'Transpose',
'Non-unit', n, n, afac, ipiv, c,
171 CALL dlavsp( uplo,
'No transpose',
'Unit', n, n, afac, ipiv, c,
176 IF( lsame( uplo,
'U' ) )
THEN
180 c( i, j ) = c( i, j ) - a( jc+i )
188 c( i, j ) = c( i, j ) - a( jc+i-j )
196 resid = dlansy(
'1', uplo, n, c, ldc, rwork )
198 IF( anorm.LE.zero )
THEN
202 resid = ( ( resid / dble( n ) ) / anorm ) / eps
subroutine dlavsp(uplo, trans, diag, n, nrhs, a, ipiv, b, ldb, info)
DLAVSP
subroutine dspt01(uplo, n, a, afac, ipiv, c, ldc, rwork, resid)
DSPT01
subroutine dlaset(uplo, m, n, alpha, beta, a, lda)
DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.