118 SUBROUTINE zpbt01( UPLO, N, KD, A, LDA, AFAC, LDAFAC, RWORK,
127 INTEGER KD, LDA, LDAFAC, N
128 DOUBLE PRECISION RESID
131 DOUBLE PRECISION RWORK( * )
132 COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * )
139 DOUBLE PRECISION ZERO, ONE
140 parameter( zero = 0.0d+0, one = 1.0d+0 )
143 INTEGER I, J, K, KC, KLEN, ML, MU
144 DOUBLE PRECISION AKK, ANORM, EPS
148 DOUBLE PRECISION DLAMCH, ZLANHB
150 EXTERNAL lsame, dlamch, zlanhb, zdotc
156 INTRINSIC dble, dimag, max, min
169 eps = dlamch(
'Epsilon' )
170 anorm = zlanhb(
'1', uplo, n, kd, a, lda, rwork )
171 IF( anorm.LE.zero )
THEN
179 IF( lsame( uplo,
'U' ) )
THEN
181 IF( dimag( afac( kd+1, j ) ).NE.zero )
THEN
188 IF( dimag( afac( 1, j ) ).NE.zero )
THEN
197 IF( lsame( uplo,
'U' ) )
THEN
199 kc = max( 1, kd+2-k )
205 $ zdotc( klen+1, afac( kc, k ), 1, afac( kc, k ), 1 ) )
206 afac( kd+1, k ) = akk
211 $
CALL ztrmv(
'Upper',
'Conjugate',
'Non-unit', klen,
212 $ afac( kd+1, k-klen ), ldafac-1,
221 klen = min( kd, n-k )
227 $
CALL zher(
'Lower', klen, one, afac( 2, k ), 1,
228 $ afac( 1, k+1 ), ldafac-1 )
232 akk = dble( afac( 1, k ) )
233 CALL zdscal( klen+1, akk, afac( 1, k ), 1 )
240 IF( lsame( uplo,
'U' ) )
THEN
242 mu = max( 1, kd+2-j )
244 afac( i, j ) = afac( i, j ) - a( i, j )
249 ml = min( kd+1, n-j+1 )
251 afac( i, j ) = afac( i, j ) - a( i, j )
258 resid = zlanhb(
'1', uplo, n, kd, afac, ldafac, rwork )
260 resid = ( ( resid / dble( n ) ) / anorm ) / eps
subroutine zher(uplo, n, alpha, x, incx, a, lda)
ZHER
subroutine zdscal(n, da, zx, incx)
ZDSCAL
subroutine ztrmv(uplo, trans, diag, n, a, lda, x, incx)
ZTRMV
subroutine zpbt01(uplo, n, kd, a, lda, afac, ldafac, rwork, resid)
ZPBT01