107 SUBROUTINE dtpt01( UPLO, DIAG, N, AP, AINVP, RCOND, WORK, RESID )
116 DOUBLE PRECISION RCOND, RESID
119 DOUBLE PRECISION AINVP( * ), AP( * ), WORK( * )
125 DOUBLE PRECISION ZERO, ONE
126 parameter( zero = 0.0d+0, one = 1.0d+0 )
131 DOUBLE PRECISION AINVNM, ANORM, EPS
135 DOUBLE PRECISION DLAMCH, DLANTP
136 EXTERNAL lsame, dlamch, dlantp
156 eps = dlamch(
'Epsilon' )
157 anorm = dlantp(
'1', uplo, diag, n, ap, work )
158 ainvnm = dlantp(
'1', uplo, diag, n, ainvp, work )
159 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
164 rcond = ( one / anorm ) / ainvnm
168 unitd = lsame( diag,
'U' )
169 IF( lsame( uplo,
'U' ) )
THEN
173 $ ainvp( jc+j-1 ) = one
177 CALL dtpmv(
'Upper',
'No transpose', diag, j, ap,
182 ainvp( jc+j-1 ) = ainvp( jc+j-1 ) - one
193 CALL dtpmv(
'Lower',
'No transpose', diag, n-j+1, ap( jc ),
198 ainvp( jc ) = ainvp( jc ) - one
205 resid = dlantp(
'1', uplo,
'Non-unit', n, ainvp, work )
207 resid = ( ( resid*rcond ) / dble( n ) ) / eps
subroutine dtpt01(uplo, diag, n, ap, ainvp, rcond, work, resid)
DTPT01
subroutine dtpmv(uplo, trans, diag, n, ap, x, incx)
DTPMV