143 SUBROUTINE cget22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, W,
144 $ work, rwork, result )
152 CHARACTER TRANSA, TRANSE, TRANSW
156 REAL RESULT( 2 ), RWORK( * )
157 COMPLEX A( lda, * ), E( lde, * ), W( * ), WORK( * )
164 parameter ( zero = 0.0e+0, one = 1.0e+0 )
166 parameter ( czero = ( 0.0e+0, 0.0e+0 ),
167 $ cone = ( 1.0e+0, 0.0e+0 ) )
170 CHARACTER NORMA, NORME
171 INTEGER ITRNSE, ITRNSW, J, JCOL, JOFF, JROW, JVEC
172 REAL ANORM, ENORM, ENRMAX, ENRMIN, ERRNRM, TEMP1,
179 EXTERNAL lsame, clange, slamch
185 INTRINSIC abs, aimag, conjg, max, min, real
196 unfl = slamch(
'Safe minimum' )
197 ulp = slamch(
'Precision' )
204 IF( lsame( transa,
'T' ) .OR. lsame( transa,
'C' ) )
THEN
208 IF( lsame( transe,
'T' ) )
THEN
211 ELSE IF( lsame( transe,
'C' ) )
THEN
216 IF( lsame( transw,
'C' ) )
THEN
224 IF( itrnse.EQ.0 )
THEN
228 temp1 = max( temp1, abs(
REAL( E( J, JVEC ) ) )+
229 $ abs( aimag( e( j, jvec ) ) ) )
231 enrmin = min( enrmin, temp1 )
232 enrmax = max( enrmax, temp1 )
241 rwork( jvec ) = max( rwork( jvec ),
242 $ abs(
REAL( E( JVEC, J ) ) )+
243 $ abs( aimag( e( jvec, j ) ) ) )
248 enrmin = min( enrmin, rwork( jvec ) )
249 enrmax = max( enrmax, rwork( jvec ) )
255 anorm = max( clange( norma, n, n, a, lda, rwork ), unfl )
259 enorm = max( clange( norme, n, n, e, lde, rwork ), ulp )
265 CALL claset(
'Full', n, n, czero, czero, work, n )
269 IF( itrnsw.EQ.0 )
THEN
272 wtemp = conjg( w( jcol ) )
275 IF( itrnse.EQ.0 )
THEN
277 work( joff+jrow ) = e( jrow, jcol )*wtemp
279 ELSE IF( itrnse.EQ.1 )
THEN
281 work( joff+jrow ) = e( jcol, jrow )*wtemp
285 work( joff+jrow ) = conjg( e( jcol, jrow ) )*wtemp
291 CALL cgemm( transa, transe, n, n, n, cone, a, lda, e, lde, -cone,
294 errnrm = clange(
'One', n, n, work, n, rwork ) / enorm
298 IF( anorm.GT.errnrm )
THEN
299 result( 1 ) = ( errnrm / anorm ) / ulp
301 IF( anorm.LT.one )
THEN
302 result( 1 ) = ( min( errnrm, anorm ) / anorm ) / ulp
304 result( 1 ) = min( errnrm / anorm, one ) / ulp
310 result( 2 ) = max( abs( enrmax-one ), abs( enrmin-one ) ) /
subroutine claset(UPLO, M, N, ALPHA, BETA, A, LDA)
CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...
subroutine cget22(TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, W, WORK, RWORK, RESULT)
CGET22
subroutine cgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
CGEMM