166 SUBROUTINE sget22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, WR,
174 CHARACTER TRANSA, TRANSE, TRANSW
178 REAL A( LDA, * ), E( LDE, * ), RESULT( 2 ), WI( * ),
186 parameter( zero = 0.0, one = 1.0 )
189 CHARACTER NORMA, NORME
190 INTEGER IECOL, IEROW, INCE, IPAIR, ITRNSE, J, JCOL,
192 REAL ANORM, ENORM, ENRMAX, ENRMIN, ERRNRM, TEMP1,
201 EXTERNAL lsame, slamch, slange
207 INTRINSIC abs, max, min, real
218 unfl = slamch(
'Safe minimum' )
219 ulp = slamch(
'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( slange( norma, n, n, a, lda, work ), unfl )
314 enorm = max( slange( norme, n, n, e, lde, work ), ulp )
320 CALL slaset(
'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 sgemm( 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 saxpy( n, wr( jcol ), e( ierow, iecol ), ince,
350 $ work( n*( jcol-1 )+1 ), 1 )
356 CALL sgemm( transa, transe, n, n, n, one, a, lda, e, lde, -one,
359 errnrm = slange(
'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 ) ) /
subroutine saxpy(n, sa, sx, incx, sy, incy)
SAXPY
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