108 SUBROUTINE cspt03( UPLO, N, A, AINV, WORK, LDW, RWORK, RCOND,
122 COMPLEX A( * ), AINV( * ), WORK( LDW, * )
129 parameter( zero = 0.0e+0, one = 1.0e+0 )
132 INTEGER I, ICOL, J, JCOL, K, KCOL, NALL
133 REAL AINVNM, ANORM, EPS
138 REAL CLANGE, CLANSP, SLAMCH
140 EXTERNAL lsame, clange, clansp, slamch, cdotu
157 eps = slamch(
'Epsilon' )
158 anorm = clansp(
'1', uplo, n, a, rwork )
159 ainvnm = clansp(
'1', uplo, n, ainv, rwork )
160 IF( anorm.LE.zero .OR. ainvnm.LE.zero )
THEN
165 rcond = ( one/anorm ) / ainvnm
171 IF( lsame( uplo,
'U' ) )
THEN
173 icol = ( ( i-1 )*i ) / 2 + 1
178 jcol = ( ( j-1 )*j ) / 2 + 1
179 t = cdotu( j, a( icol ), 1, ainv( jcol ), 1 )
180 jcol = jcol + 2*j - 1
183 t = t + a( kcol+k )*ainv( jcol )
188 t = t + a( kcol )*ainv( jcol )
198 jcol = ( ( j-1 )*j ) / 2 + 1
199 t = cdotu( i, a( icol ), 1, ainv( jcol ), 1 )
201 kcol = icol + 2*i - 1
203 t = t + a( kcol )*ainv( jcol+k )
208 t = t + a( kcol )*ainv( jcol )
219 nall = ( n*( n+1 ) ) / 2
224 icol = nall - ( ( n-i+1 )*( n-i+2 ) ) / 2 + 1
226 jcol = nall - ( ( n-j )*( n-j+1 ) ) / 2 - ( n-i )
227 t = cdotu( n-i+1, a( icol ), 1, ainv( jcol ), 1 )
231 t = t + a( kcol )*ainv( jcol )
237 t = t + a( kcol )*ainv( jcol+k )
245 icol = nall - ( ( n-i )*( n-i+1 ) ) / 2
247 jcol = nall - ( ( n-j+1 )*( n-j+2 ) ) / 2 + 1
248 t = cdotu( n-j+1, a( icol-n+j ), 1, ainv( jcol ), 1 )
252 t = t + a( kcol )*ainv( jcol )
258 t = t + a( kcol+k )*ainv( jcol )
269 work( i, i ) = work( i, i ) + one
274 resid = clange(
'1', n, n, work, ldw, rwork )
276 resid = ( ( resid*rcond )/eps ) / real( n )
subroutine cspt03(uplo, n, a, ainv, work, ldw, rwork, rcond, resid)
CSPT03