159 SUBROUTINE chet22( ITYPE, UPLO, N, M, KBAND, A, LDA, D, E, U, LDU,
160 $ V, LDV, TAU, WORK, RWORK, RESULT )
168 INTEGER ITYPE, KBAND, LDA, LDU, LDV, M, N
171 REAL D( * ), E( * ), RESULT( 2 ), RWORK( * )
172 COMPLEX A( LDA, * ), TAU( * ), U( LDU, * ),
173 $ v( ldv, * ), work( * )
180 parameter( zero = 0.0e0, one = 1.0e0 )
182 parameter( czero = ( 0.0e0, 0.0e0 ),
183 $ cone = ( 1.0e0, 0.0e0 ) )
186 INTEGER J, JJ, JJ1, JJ2, NN, NNP1
187 REAL ANORM, ULP, UNFL, WNORM
191 EXTERNAL clanhe, slamch
197 INTRINSIC max, min, real
203 IF( n.LE.0 .OR. m.LE.0 )
206 unfl = slamch(
'Safe minimum' )
207 ulp = slamch(
'Precision' )
213 anorm = max( clanhe(
'1', uplo, n, a, lda, rwork ), unfl )
219 CALL chemm(
'L', uplo, n, m, cone, a, lda, u, ldu, czero, work,
223 CALL cgemm(
'C',
'N', m, m, n, cone, u, ldu, work, n, czero,
226 jj = nn + ( j-1 )*n + j
227 work( jj ) = work( jj ) - d( j )
229 IF( kband.EQ.1 .AND. n.GT.1 )
THEN
231 jj1 = nn + ( j-1 )*n + j - 1
232 jj2 = nn + ( j-2 )*n + j
233 work( jj1 ) = work( jj1 ) - e( j-1 )
234 work( jj2 ) = work( jj2 ) - e( j-1 )
237 wnorm = clanhe(
'1', uplo, m, work( nnp1 ), n, rwork )
239 IF( anorm.GT.wnorm )
THEN
240 result( 1 ) = ( wnorm / anorm ) / ( m*ulp )
242 IF( anorm.LT.one )
THEN
243 result( 1 ) = ( min( wnorm, m*anorm ) / anorm ) / ( m*ulp )
245 result( 1 ) = min( wnorm / anorm, real( m ) ) / ( m*ulp )
254 $
CALL cunt01(
'Columns', n, m, u, ldu, work, 2*n*n, rwork,
subroutine chet22(itype, uplo, n, m, kband, a, lda, d, e, u, ldu, v, ldv, tau, work, rwork, result)
CHET22
subroutine cunt01(rowcol, m, n, u, ldu, work, lwork, rwork, resid)
CUNT01
subroutine cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
CGEMM
subroutine chemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc)
CHEMM