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
191 DOUBLE PRECISION DLAMCH, ZLANHE
192 EXTERNAL dlamch, zlanhe
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,
subroutine zgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
ZGEMM
subroutine zunt01(ROWCOL, M, N, U, LDU, WORK, LWORK, RWORK, RESID)
ZUNT01
subroutine zhemm(SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
ZHEMM
subroutine zhet22(ITYPE, UPLO, N, M, KBAND, A, LDA, D, E, U, LDU, V, LDV, TAU, WORK, RWORK, RESULT)
ZHET22