94 SUBROUTINE cppt01( UPLO, N, A, AFAC, RWORK, RESID )
107 COMPLEX A( * ), AFAC( * )
114 parameter( zero = 0.0e+0, one = 1.0e+0 )
125 EXTERNAL lsame, clanhp, slamch, cdotc
131 INTRINSIC aimag, real
144 eps = slamch(
'Epsilon' )
145 anorm = clanhp(
'1', uplo, n, a, rwork )
146 IF( anorm.LE.zero )
THEN
155 IF( lsame( uplo,
'U' ) )
THEN
157 IF( aimag( afac( kc ) ).NE.zero )
THEN
165 IF( aimag( afac( kc ) ).NE.zero )
THEN
175 IF( lsame( uplo,
'U' ) )
THEN
176 kc = ( n*( n-1 ) ) / 2 + 1
181 tr = real( cdotc( k, afac( kc ), 1, afac( kc ), 1 ) )
187 CALL ctpmv(
'Upper',
'Conjugate',
'Non-unit', k-1, afac,
198 afac( kc+i-1 ) = afac( kc+i-1 ) - a( kc+i-1 )
200 afac( kc+k-1 ) = afac( kc+k-1 ) - real( a( kc+k-1 ) )
207 kc = ( n*( n+1 ) ) / 2
214 $
CALL chpr(
'Lower', n-k, one, afac( kc+1 ), 1,
220 CALL cscal( n-k+1, tc, afac( kc ), 1 )
229 afac( kc ) = afac( kc ) - real( a( kc ) )
231 afac( kc+i-k ) = afac( kc+i-k ) - a( kc+i-k )
239 resid = clanhp(
'1', uplo, n, afac, rwork )
241 resid = ( ( resid / real( n ) ) / anorm ) / eps
subroutine chpr(uplo, n, alpha, x, incx, ap)
CHPR
subroutine ctpmv(uplo, trans, diag, n, ap, x, incx)
CTPMV