159 SUBROUTINE zhet22( 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 DOUBLE PRECISION D( * ), E( * ), RESULT( 2 ), RWORK( * )
172 COMPLEX*16 A( LDA, * ), TAU( * ), U( LDU, * ),
173 $ v( ldv, * ), work( * )
179 DOUBLE PRECISION ZERO, ONE
180 parameter( zero = 0.0d0, one = 1.0d0 )
181 COMPLEX*16 CZERO, CONE
182 parameter( czero = ( 0.0d0, 0.0d0 ),
183 $ cone = ( 1.0d0, 0.0d0 ) )
186 INTEGER J, JJ, JJ1, JJ2, NN, NNP1
187 DOUBLE PRECISION ANORM, ULP, UNFL, WNORM
190 DOUBLE PRECISION DLAMCH, ZLANHE
191 EXTERNAL dlamch, zlanhe
197 INTRINSIC dble, max, min
203 IF( n.LE.0 .OR. m.LE.0 )
206 unfl = dlamch(
'Safe minimum' )
207 ulp = dlamch(
'Precision' )
213 anorm = max( zlanhe(
'1', uplo, n, a, lda, rwork ), unfl )
219 CALL zhemm(
'L', uplo, n, m, cone, a, lda, u, ldu, czero, work,
223 CALL zgemm(
'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 = zlanhe(
'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, dble( m ) ) / ( m*ulp )
254 $
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 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
subroutine zunt01(rowcol, m, n, u, ldu, work, lwork, rwork, resid)
ZUNT01