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,
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 ) ) /