108 SUBROUTINE ztpt01( UPLO, DIAG, N, AP, AINVP, RCOND, RWORK, RESID )
117 DOUBLE PRECISION RCOND, RESID
120 DOUBLE PRECISION RWORK( * )
121 COMPLEX*16 AINVP( * ), AP( * )
127 DOUBLE PRECISION ZERO, ONE
128 parameter( zero = 0.0d+0, one = 1.0d+0 )
133 DOUBLE PRECISION AINVNM, ANORM, EPS
137 DOUBLE PRECISION DLAMCH, ZLANTP
138 EXTERNAL lsame, dlamch, zlantp
158 eps = dlamch(
'Epsilon' )
159 anorm = zlantp(
'1', uplo, diag, n, ap, rwork )
160 ainvnm = zlantp(
'1', uplo, diag, n, ainvp, rwork )
161 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
166 rcond = ( one / anorm ) / ainvnm
170 unitd = lsame( diag,
'U' )
171 IF( lsame( uplo,
'U' ) )
THEN
175 $ ainvp( jc+j-1 ) = one
179 CALL ztpmv(
'Upper',
'No transpose', diag, j, ap,
184 ainvp( jc+j-1 ) = ainvp( jc+j-1 ) - one
195 CALL ztpmv(
'Lower',
'No transpose', diag, n-j+1, ap( jc ),
200 ainvp( jc ) = ainvp( jc ) - one
207 resid = zlantp(
'1', uplo,
'Non-unit', n, ainvp, rwork )
209 resid = ( ( resid*rcond ) / dble( n ) ) / eps
subroutine ztpmv(uplo, trans, diag, n, ap, x, incx)
ZTPMV
subroutine ztpt01(uplo, diag, n, ap, ainvp, rcond, rwork, resid)
ZTPT01