159 SUBROUTINE zhet22( 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 DOUBLE PRECISION d( * ), e( * ), result( 2 ), rwork( * )
173 COMPLEX*16 a( lda, * ), tau( * ), u( ldu, * ),
174 $ v( ldv, * ), work( * )
180 DOUBLE PRECISION zero, one
181 parameter( zero = 0.0d0, one = 1.0d0 )
182 COMPLEX*16 czero, cone
183 parameter( czero = ( 0.0d0, 0.0d0 ),
184 $ cone = ( 1.0d0, 0.0d0 ) )
187 INTEGER j, jj, jj1, jj2, nn, nnp1
188 DOUBLE PRECISION anorm, ulp, unfl, wnorm
198 INTRINSIC dble, max, min
204 IF( n.LE.0 .OR. m.LE.0 )
207 unfl =
dlamch(
'Safe minimum' )
208 ulp =
dlamch(
'Precision' )
214 anorm = max(
zlanhe(
'1', uplo, n, a, lda, rwork ), unfl )
220 CALL
zhemm(
'L', uplo, n, m, cone, a, lda, u, ldu, czero, work,
224 CALL
zgemm(
'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 =
zlanhe(
'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, dble( m ) ) / ( m*ulp )
255 $ CALL
zunt01(
'Columns', n, m, u, ldu, work, 2*n*n, rwork,