142 SUBROUTINE cget22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, W,
143 $ WORK, RWORK, RESULT )
150 CHARACTER TRANSA, TRANSE, TRANSW
154 REAL RESULT( 2 ), RWORK( * )
155 COMPLEX A( LDA, * ), E( LDE, * ), W( * ), WORK( * )
162 parameter( zero = 0.0e+0, one = 1.0e+0 )
164 parameter( czero = ( 0.0e+0, 0.0e+0 ),
165 $ cone = ( 1.0e+0, 0.0e+0 ) )
168 CHARACTER NORMA, NORME
169 INTEGER ITRNSE, ITRNSW, J, JCOL, JOFF, JROW, JVEC
170 REAL ANORM, ENORM, ENRMAX, ENRMIN, ERRNRM, TEMP1,
177 EXTERNAL lsame, clange, slamch
183 INTRINSIC abs, aimag, conjg, max, min, real
194 unfl = slamch(
'Safe minimum' )
195 ulp = slamch(
'Precision' )
202 IF( lsame( transa,
'T' ) .OR. lsame( transa,
'C' ) )
THEN
206 IF( lsame( transe,
'T' ) )
THEN
209 ELSE IF( lsame( transe,
'C' ) )
THEN
214 IF( lsame( transw,
'C' ) )
THEN
222 IF( itrnse.EQ.0 )
THEN
226 temp1 = max( temp1, abs( real( e( j, jvec ) ) )+
227 $ abs( aimag( e( j, jvec ) ) ) )
229 enrmin = min( enrmin, temp1 )
230 enrmax = max( enrmax, temp1 )
239 rwork( jvec ) = max( rwork( jvec ),
240 $ abs( real( e( jvec, j ) ) )+
241 $ abs( aimag( e( jvec, j ) ) ) )
246 enrmin = min( enrmin, rwork( jvec ) )
247 enrmax = max( enrmax, rwork( jvec ) )
253 anorm = max( clange( norma, n, n, a, lda, rwork ), unfl )
257 enorm = max( clange( norme, n, n, e, lde, rwork ), ulp )
263 CALL claset(
'Full', n, n, czero, czero, work, n )
267 IF( itrnsw.EQ.0 )
THEN
270 wtemp = conjg( w( jcol ) )
273 IF( itrnse.EQ.0 )
THEN
275 work( joff+jrow ) = e( jrow, jcol )*wtemp
277 ELSE IF( itrnse.EQ.1 )
THEN
279 work( joff+jrow ) = e( jcol, jrow )*wtemp
283 work( joff+jrow ) = conjg( e( jcol, jrow ) )*wtemp
289 CALL cgemm( transa, transe, n, n, n, cone, a, lda, e, lde, -cone,
292 errnrm = clange(
'One', n, n, work, n, rwork ) / enorm
296 IF( anorm.GT.errnrm )
THEN
297 result( 1 ) = ( errnrm / anorm ) / ulp
299 IF( anorm.LT.one )
THEN
300 result( 1 ) = one / ulp
302 result( 1 ) = min( errnrm / anorm, one ) / ulp
308 result( 2 ) = max( abs( enrmax-one ), abs( enrmin-one ) ) /
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
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.