159 SUBROUTINE chet22( ITYPE, UPLO, N, M, KBAND, A, LDA, D, E, U, LDU,
160 $ v, ldv, tau, work, rwork, result )
169 INTEGER itype, kband, lda, ldu, ldv, m, n
172 REAL d( * ), e( * ), result( 2 ), rwork( * )
173 COMPLEX a( lda, * ), tau( * ), u( ldu, * ),
174 $ v( ldv, * ), work( * )
181 parameter( zero = 0.0e0, one = 1.0e0 )
183 parameter( czero = ( 0.0e0, 0.0e0 ),
184 $ cone = ( 1.0e0, 0.0e0 ) )
187 INTEGER j, jj, jj1, jj2, nn, nnp1
188 REAL anorm, ulp, unfl, wnorm
198 INTRINSIC max, min, real
204 IF( n.LE.0 .OR. m.LE.0 )
207 unfl =
slamch(
'Safe minimum' )
208 ulp =
slamch(
'Precision' )
214 anorm = max(
clanhe(
'1', uplo, n, a, lda, rwork ), unfl )
220 CALL
chemm(
'L', uplo, n, m, cone, a, lda, u, ldu, czero, work,
224 CALL
cgemm(
'C',
'N', m, m, n, cone, u, ldu, work, n, czero,
227 jj = nn + ( j-1 )*n + j
228 work( jj ) = work( jj ) - d( j )
230 IF( kband.EQ.1 .AND. n.GT.1 )
THEN
232 jj1 = nn + ( j-1 )*n + j - 1
233 jj2 = nn + ( j-2 )*n + j
234 work( jj1 ) = work( jj1 ) - e( j-1 )
235 work( jj2 ) = work( jj2 ) - e( j-1 )
238 wnorm =
clanhe(
'1', uplo, m, work( nnp1 ), n, rwork )
240 IF( anorm.GT.wnorm )
THEN
241 result( 1 ) = ( wnorm / anorm ) / ( m*ulp )
243 IF( anorm.LT.one )
THEN
244 result( 1 ) = ( min( wnorm, m*anorm ) / anorm ) / ( m*ulp )
246 result( 1 ) = min( wnorm / anorm,
REAL( M ) ) / ( m*ulp )
255 $ CALL
cunt01(
'Columns', n, m, u, ldu, work, 2*n*n, rwork,