160 SUBROUTINE zget52( LEFT, N, A, LDA, B, LDB, E, LDE, ALPHA, BETA,
161 $ WORK, RWORK, RESULT )
169 INTEGER LDA, LDB, LDE, N
172 DOUBLE PRECISION RESULT( 2 ), RWORK( * )
173 COMPLEX*16 A( LDA, * ), ALPHA( * ), B( LDB, * ),
174 $ beta( * ), e( lde, * ), work( * )
180 DOUBLE PRECISION ZERO, ONE
181 parameter( zero = 0.0d+0, one = 1.0d+0 )
182 COMPLEX*16 CZERO, CONE
183 parameter( czero = ( 0.0d+0, 0.0d+0 ),
184 $ cone = ( 1.0d+0, 0.0d+0 ) )
187 CHARACTER NORMAB, TRANS
189 DOUBLE PRECISION ABMAX, ALFMAX, ANORM, BETMAX, BNORM, ENORM,
190 $ enrmer, errnrm, safmax, safmin, scale, temp1,
192 COMPLEX*16 ACOEFF, ALPHAI, BCOEFF, BETAI, X
195 DOUBLE PRECISION DLAMCH, ZLANGE
196 EXTERNAL dlamch, zlange
202 INTRINSIC abs, dble, dconjg, dimag, max
205 DOUBLE PRECISION ABS1
208 abs1( x ) = abs( dble( x ) ) + abs( dimag( x ) )
217 safmin = dlamch(
'Safe minimum' )
218 safmax = one / safmin
219 ulp = dlamch(
'Epsilon' )*dlamch(
'Base' )
231 anorm = max( zlange( normab, n, n, a, lda, rwork ), safmin )
232 bnorm = max( zlange( normab, n, n, b, ldb, rwork ), safmin )
233 enorm = max( zlange(
'O', n, n, e, lde, rwork ), ulp )
234 alfmax = safmax / max( one, bnorm )
235 betmax = safmax / max( one, anorm )
241 alphai = alpha( jvec )
243 abmax = max( abs1( alphai ), abs1( betai ) )
244 IF( abs1( alphai ).GT.alfmax .OR. abs1( betai ).GT.betmax .OR.
245 $ abmax.LT.one )
THEN
246 scale = one / max( abmax, safmin )
247 alphai = scale*alphai
250 scale = one / max( abs1( alphai )*bnorm, abs1( betai )*anorm,
253 bcoeff = scale*alphai
255 acoeff = dconjg( acoeff )
256 bcoeff = dconjg( bcoeff )
258 CALL zgemv( trans, n, n, acoeff, a, lda, e( 1, jvec ), 1,
259 $ czero, work( n*( jvec-1 )+1 ), 1 )
260 CALL zgemv( trans, n, n, -bcoeff, b, lda, e( 1, jvec ), 1,
261 $ cone, work( n*( jvec-1 )+1 ), 1 )
264 errnrm = zlange(
'One', n, n, work, n, rwork ) / enorm
268 result( 1 ) = errnrm / ulp
276 temp1 = max( temp1, abs1( e( j, jvec ) ) )
278 enrmer = max( enrmer, abs( temp1-one ) )
283 result( 2 ) = enrmer / ( dble( n )*ulp )
subroutine zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
ZGEMV
subroutine zget52(left, n, a, lda, b, ldb, e, lde, alpha, beta, work, rwork, result)
ZGET52