142 SUBROUTINE zget22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, W,
143 $ WORK, RWORK, RESULT )
150 CHARACTER TRANSA, TRANSE, TRANSW
154 DOUBLE PRECISION RESULT( 2 ), RWORK( * )
155 COMPLEX*16 A( LDA, * ), E( LDE, * ), W( * ), WORK( * )
161 DOUBLE PRECISION ZERO, ONE
162 parameter( zero = 0.0d+0, one = 1.0d+0 )
163 COMPLEX*16 CZERO, CONE
164 parameter( czero = ( 0.0d+0, 0.0d+0 ),
165 $ cone = ( 1.0d+0, 0.0d+0 ) )
168 CHARACTER NORMA, NORME
169 INTEGER ITRNSE, ITRNSW, J, JCOL, JOFF, JROW, JVEC
170 DOUBLE PRECISION ANORM, ENORM, ENRMAX, ENRMIN, ERRNRM, TEMP1,
176 DOUBLE PRECISION DLAMCH, ZLANGE
177 EXTERNAL lsame, dlamch, zlange
183 INTRINSIC abs, dble, dconjg, dimag, max, min
194 unfl = dlamch(
'Safe minimum' )
195 ulp = dlamch(
'Precision' )
202 IF( lsame( transa,
'T' ) .OR. lsame( transa,
'C' ) )
THEN
206 IF( lsame( transe,
'T' ) )
THEN
209 ELSE IF( lsame( transe,
'C' ) )
THEN
214 IF( lsame( transw,
'C' ) )
THEN
222 IF( itrnse.EQ.0 )
THEN
226 temp1 = max( temp1, abs( dble( e( j, jvec ) ) )+
227 $ abs( dimag( e( j, jvec ) ) ) )
229 enrmin = min( enrmin, temp1 )
230 enrmax = max( enrmax, temp1 )
239 rwork( jvec ) = max( rwork( jvec ),
240 $ abs( dble( e( jvec, j ) ) )+
241 $ abs( dimag( e( jvec, j ) ) ) )
246 enrmin = min( enrmin, rwork( jvec ) )
247 enrmax = max( enrmax, rwork( jvec ) )
253 anorm = max( zlange( norma, n, n, a, lda, rwork ), unfl )
257 enorm = max( zlange( norme, n, n, e, lde, rwork ), ulp )
263 CALL zlaset(
'Full', n, n, czero, czero, work, n )
267 IF( itrnsw.EQ.0 )
THEN
270 wtemp = dconjg( w( jcol ) )
273 IF( itrnse.EQ.0 )
THEN
275 work( joff+jrow ) = e( jrow, jcol )*wtemp
277 ELSE IF( itrnse.EQ.1 )
THEN
279 work( joff+jrow ) = e( jcol, jrow )*wtemp
283 work( joff+jrow ) = dconjg( e( jcol, jrow ) )*wtemp
289 CALL zgemm( transa, transe, n, n, n, cone, a, lda, e, lde, -cone,
292 errnrm = zlange(
'One', n, n, work, n, rwork ) / enorm
296 IF( anorm.GT.errnrm )
THEN
297 result( 1 ) = ( errnrm / anorm ) / ulp
299 IF( anorm.LT.one )
THEN
300 result( 1 ) = one / ulp
302 result( 1 ) = min( errnrm / anorm, one ) / ulp
308 result( 2 ) = max( abs( enrmax-one ), abs( enrmin-one ) ) /
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM
subroutine zlaset(uplo, m, n, alpha, beta, a, lda)
ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine zget22(transa, transe, transw, n, a, lda, e, lde, w, work, rwork, result)
ZGET22