108 SUBROUTINE cppt03( UPLO, N, A, AINV, WORK, LDWORK, RWORK, RCOND,
122 COMPLEX A( * ), AINV( * ), WORK( LDWORK, * )
129 parameter( zero = 0.0e+0, one = 1.0e+0 )
131 parameter( czero = ( 0.0e+0, 0.0e+0 ),
132 $ cone = ( 1.0e+0, 0.0e+0 ) )
136 REAL AINVNM, ANORM, EPS
140 REAL CLANGE, CLANHP, SLAMCH
141 EXTERNAL lsame, clange, clanhp, slamch
144 INTRINSIC conjg, real
161 eps = slamch(
'Epsilon' )
162 anorm = clanhp(
'1', uplo, n, a, rwork )
163 ainvnm = clanhp(
'1', uplo, n, ainv, rwork )
164 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
169 rcond = ( one/anorm ) / ainvnm
176 IF( lsame( uplo,
'U' ) )
THEN
182 CALL ccopy( j, ainv( jj ), 1, work( 1, j+1 ), 1 )
184 work( j, i+1 ) = conjg( ainv( jj+i-1 ) )
188 jj = ( ( n-1 )*n ) / 2 + 1
190 work( n, i+1 ) = conjg( ainv( jj+i-1 ) )
196 CALL chpmv(
'Upper', n, -cone, a, work( 1, j+1 ), 1, czero,
199 CALL chpmv(
'Upper', n, -cone, a, ainv( jj ), 1, czero,
211 work( 1, i ) = conjg( ainv( i+1 ) )
215 CALL ccopy( n-j+1, ainv( jj ), 1, work( j, j-1 ), 1 )
217 work( j, j+i-1 ) = conjg( ainv( jj+i ) )
225 CALL chpmv(
'Lower', n, -cone, a, work( 1, j-1 ), 1, czero,
228 CALL chpmv(
'Lower', n, -cone, a, ainv( 1 ), 1, czero,
236 work( i, i ) = work( i, i ) + cone
241 resid = clange(
'1', n, n, work, ldwork, rwork )
243 resid = ( ( resid*rcond )/eps ) / real( n )
subroutine cppt03(uplo, n, a, ainv, work, ldwork, rwork, rcond, resid)
CPPT03
subroutine ccopy(n, cx, incx, cy, incy)
CCOPY
subroutine chpmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
CHPMV