166 SUBROUTINE dget22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, WR,
174 CHARACTER TRANSA, TRANSE, TRANSW
178 DOUBLE PRECISION A( LDA, * ), E( LDE, * ), RESULT( 2 ), WI( * ),
185 DOUBLE PRECISION ZERO, ONE
186 parameter( zero = 0.0d0, one = 1.0d0 )
189 CHARACTER NORMA, NORME
190 INTEGER IECOL, IEROW, INCE, IPAIR, ITRNSE, J, JCOL,
192 DOUBLE PRECISION ANORM, ENORM, ENRMAX, ENRMIN, ERRNRM, TEMP1,
196 DOUBLE PRECISION WMAT( 2, 2 )
200 DOUBLE PRECISION DLAMCH, DLANGE
201 EXTERNAL lsame, dlamch, dlange
207 INTRINSIC abs, dble, max, min
218 unfl = dlamch(
'Safe minimum' )
219 ulp = dlamch(
'Precision' )
226 IF( lsame( transa,
'T' ) .OR. lsame( transa,
'C' ) )
THEN
229 IF( lsame( transe,
'T' ) .OR. lsame( transe,
'C' ) )
THEN
239 IF( itrnse.EQ.0 )
THEN
246 IF( ipair.EQ.0 .AND. jvec.LT.n .AND. wi( jvec ).NE.zero )
248 IF( ipair.EQ.1 )
THEN
253 temp1 = max( temp1, abs( e( j, jvec ) )+
254 $ abs( e( j, jvec+1 ) ) )
256 enrmin = min( enrmin, temp1 )
257 enrmax = max( enrmax, temp1 )
259 ELSE IF( ipair.EQ.2 )
THEN
266 temp1 = max( temp1, abs( e( j, jvec ) ) )
268 enrmin = min( enrmin, temp1 )
269 enrmax = max( enrmax, temp1 )
285 IF( ipair.EQ.0 .AND. jvec.LT.n .AND. wi( jvec ).NE.zero )
287 IF( ipair.EQ.1 )
THEN
288 work( jvec ) = max( work( jvec ),
289 $ abs( e( j, jvec ) )+abs( e( j,
291 work( jvec+1 ) = work( jvec )
292 ELSE IF( ipair.EQ.2 )
THEN
295 work( jvec ) = max( work( jvec ),
296 $ abs( e( j, jvec ) ) )
303 enrmin = min( enrmin, work( jvec ) )
304 enrmax = max( enrmax, work( jvec ) )
310 anorm = max( dlange( norma, n, n, a, lda, work ), unfl )
314 enorm = max( dlange( norme, n, n, e, lde, work ), ulp )
320 CALL dlaset(
'Full', n, n, zero, zero, work, n )
327 IF( itrnse.EQ.1 )
THEN
333 IF( ipair.EQ.0 .AND. wi( jcol ).NE.zero )
336 IF( ipair.EQ.1 )
THEN
337 wmat( 1, 1 ) = wr( jcol )
338 wmat( 2, 1 ) = -wi( jcol )
339 wmat( 1, 2 ) = wi( jcol )
340 wmat( 2, 2 ) = wr( jcol )
341 CALL dgemm( transe, transw, n, 2, 2, one, e( ierow, iecol ),
342 $ lde, wmat, 2, zero, work( n*( jcol-1 )+1 ), n )
344 ELSE IF( ipair.EQ.2 )
THEN
349 CALL daxpy( n, wr( jcol ), e( ierow, iecol ), ince,
350 $ work( n*( jcol-1 )+1 ), 1 )
356 CALL dgemm( transa, transe, n, n, n, one, a, lda, e, lde, -one,
359 errnrm = dlange(
'One', n, n, work, n, work( n*n+1 ) ) / enorm
363 IF( anorm.GT.errnrm )
THEN
364 result( 1 ) = ( errnrm / anorm ) / ulp
366 IF( anorm.LT.one )
THEN
367 result( 1 ) = one / ulp
369 result( 1 ) = min( errnrm / anorm, one ) / ulp
375 result( 2 ) = max( abs( enrmax-one ), abs( enrmin-one ) ) /