167 SUBROUTINE sget22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, WR,
176 CHARACTER TRANSA, TRANSE, TRANSW
180 REAL A( lda, * ), E( lde, * ), RESULT( 2 ), WI( * ),
188 parameter ( zero = 0.0, one = 1.0 )
191 CHARACTER NORMA, NORME
192 INTEGER IECOL, IEROW, INCE, IPAIR, ITRNSE, J, JCOL,
194 REAL ANORM, ENORM, ENRMAX, ENRMIN, ERRNRM, TEMP1,
203 EXTERNAL lsame, slamch, slange
209 INTRINSIC abs, max, min, real
220 unfl = slamch(
'Safe minimum' )
221 ulp = slamch(
'Precision' )
228 IF( lsame( transa,
'T' ) .OR. lsame( transa,
'C' ) )
THEN
231 IF( lsame( transe,
'T' ) .OR. lsame( transe,
'C' ) )
THEN
241 IF( itrnse.EQ.0 )
THEN
248 IF( ipair.EQ.0 .AND. jvec.LT.n .AND. wi( jvec ).NE.zero )
250 IF( ipair.EQ.1 )
THEN
255 temp1 = max( temp1, abs( e( j, jvec ) )+
256 $ abs( e( j, jvec+1 ) ) )
258 enrmin = min( enrmin, temp1 )
259 enrmax = max( enrmax, temp1 )
261 ELSE IF( ipair.EQ.2 )
THEN
268 temp1 = max( temp1, abs( e( j, jvec ) ) )
270 enrmin = min( enrmin, temp1 )
271 enrmax = max( enrmax, temp1 )
287 IF( ipair.EQ.0 .AND. jvec.LT.n .AND. wi( jvec ).NE.zero )
289 IF( ipair.EQ.1 )
THEN
290 work( jvec ) = max( work( jvec ),
291 $ abs( e( j, jvec ) )+abs( e( j,
293 work( jvec+1 ) = work( jvec )
294 ELSE IF( ipair.EQ.2 )
THEN
297 work( jvec ) = max( work( jvec ),
298 $ abs( e( j, jvec ) ) )
305 enrmin = min( enrmin, work( jvec ) )
306 enrmax = max( enrmax, work( jvec ) )
312 anorm = max( slange( norma, n, n, a, lda, work ), unfl )
316 enorm = max( slange( norme, n, n, e, lde, work ), ulp )
322 CALL slaset(
'Full', n, n, zero, zero, work, n )
329 IF( itrnse.EQ.1 )
THEN
335 IF( ipair.EQ.0 .AND. wi( jcol ).NE.zero )
338 IF( ipair.EQ.1 )
THEN
339 wmat( 1, 1 ) = wr( jcol )
340 wmat( 2, 1 ) = -wi( jcol )
341 wmat( 1, 2 ) = wi( jcol )
342 wmat( 2, 2 ) = wr( jcol )
343 CALL sgemm( transe, transw, n, 2, 2, one, e( ierow, iecol ),
344 $ lde, wmat, 2, zero, work( n*( jcol-1 )+1 ), n )
346 ELSE IF( ipair.EQ.2 )
THEN
351 CALL saxpy( n, wr( jcol ), e( ierow, iecol ), ince,
352 $ work( n*( jcol-1 )+1 ), 1 )
358 CALL sgemm( transa, transe, n, n, n, one, a, lda, e, lde, -one,
361 errnrm = slange(
'One', n, n, work, n, work( n*n+1 ) ) / enorm
365 IF( anorm.GT.errnrm )
THEN
366 result( 1 ) = ( errnrm / anorm ) / ulp
368 IF( anorm.LT.one )
THEN
369 result( 1 ) = ( min( errnrm, anorm ) / anorm ) / ulp
371 result( 1 ) = min( errnrm / anorm, one ) / ulp
377 result( 2 ) = max( abs( enrmax-one ), abs( enrmin-one ) ) /
subroutine sgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
SGEMM
subroutine slaset(UPLO, M, N, ALPHA, BETA, A, LDA)
SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...
subroutine sget22(TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, WR, WI, WORK, RESULT)
SGET22
subroutine saxpy(N, SA, SX, INCX, SY, INCY)
SAXPY