159 SUBROUTINE cget52( LEFT, N, A, LDA, B, LDB, E, LDE, ALPHA, BETA,
160 $ WORK, RWORK, RESULT )
168 INTEGER LDA, LDB, LDE, N
171 REAL RESULT( 2 ), RWORK( * )
172 COMPLEX A( LDA, * ), ALPHA( * ), B( LDB, * ),
173 $ beta( * ), e( lde, * ), work( * )
180 parameter( zero = 0.0e+0, one = 1.0e+0 )
182 parameter( czero = ( 0.0e+0, 0.0e+0 ),
183 $ cone = ( 1.0e+0, 0.0e+0 ) )
186 CHARACTER NORMAB, TRANS
188 REAL ABMAX, ALFMAX, ANORM, BETMAX, BNORM, ENORM,
189 $ enrmer, errnrm, safmax, safmin, scale, temp1,
191 COMPLEX ACOEFF, ALPHAI, BCOEFF, BETAI, X
195 EXTERNAL clange, slamch
201 INTRINSIC abs, aimag, conjg, max, real
207 abs1( x ) = abs( real( x ) ) + abs( aimag( x ) )
216 safmin = slamch(
'Safe minimum' )
217 safmax = one / safmin
218 ulp = slamch(
'Epsilon' )*slamch(
'Base' )
230 anorm = max( clange( normab, n, n, a, lda, rwork ), safmin )
231 bnorm = max( clange( normab, n, n, b, ldb, rwork ), safmin )
232 enorm = max( clange(
'O', n, n, e, lde, rwork ), ulp )
233 alfmax = safmax / max( one, bnorm )
234 betmax = safmax / max( one, anorm )
240 alphai = alpha( jvec )
242 abmax = max( abs1( alphai ), abs1( betai ) )
243 IF( abs1( alphai ).GT.alfmax .OR. abs1( betai ).GT.betmax .OR.
244 $ abmax.LT.one )
THEN
245 scale = one / max( abmax, safmin )
246 alphai = scale*alphai
249 scale = one / max( abs1( alphai )*bnorm, abs1( betai )*anorm,
252 bcoeff = scale*alphai
254 acoeff = conjg( acoeff )
255 bcoeff = conjg( bcoeff )
257 CALL cgemv( trans, n, n, acoeff, a, lda, e( 1, jvec ), 1,
258 $ czero, work( n*( jvec-1 )+1 ), 1 )
259 CALL cgemv( trans, n, n, -bcoeff, b, lda, e( 1, jvec ), 1,
260 $ cone, work( n*( jvec-1 )+1 ), 1 )
263 errnrm = clange(
'One', n, n, work, n, rwork ) / enorm
267 result( 1 ) = errnrm / ulp
275 temp1 = max( temp1, abs1( e( j, jvec ) ) )
277 enrmer = max( enrmer, abs( temp1-one ) )
282 result( 2 ) = enrmer / ( real( n )*ulp )
subroutine cget52(left, n, a, lda, b, ldb, e, lde, alpha, beta, work, rwork, result)
CGET52
subroutine cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
CGEMV