197 SUBROUTINE sget52( LEFT, N, A, LDA, B, LDB, E, LDE, ALPHAR,
198 $ ALPHAI, BETA, WORK, RESULT )
206 INTEGER LDA, LDB, LDE, N
209 REAL A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
210 $ b( ldb, * ), beta( * ), e( lde, * ),
211 $ result( 2 ), work( * )
218 parameter( zero = 0.0, one = 1.0, ten = 10.0 )
222 CHARACTER NORMAB, TRANS
224 REAL ABMAX, ACOEF, ALFMAX, ANORM, BCOEFI, BCOEFR,
225 $ betmax, bnorm, enorm, enrmer, errnrm, safmax,
226 $ safmin, salfi, salfr, sbeta, scale, temp1, ulp
230 EXTERNAL slamch, slange
236 INTRINSIC abs, max, real
245 safmin = slamch(
'Safe minimum' )
246 safmax = one / safmin
247 ulp = slamch(
'Epsilon' )*slamch(
'Base' )
259 anorm = max( slange( normab, n, n, a, lda, work ), safmin )
260 bnorm = max( slange( normab, n, n, b, ldb, work ), safmin )
261 enorm = max( slange(
'O', n, n, e, lde, work ), ulp )
262 alfmax = safmax / max( one, bnorm )
263 betmax = safmax / max( one, anorm )
276 salfr = alphar( jvec )
277 salfi = alphai( jvec )
279 IF( salfi.EQ.zero )
THEN
283 abmax = max( abs( salfr ), abs( sbeta ) )
284 IF( abs( salfr ).GT.alfmax .OR. abs( sbeta ).GT.
285 $ betmax .OR. abmax.LT.one )
THEN
286 scale = one / max( abmax, safmin )
290 scale = one / max( abs( salfr )*bnorm,
291 $ abs( sbeta )*anorm, safmin )
294 CALL sgemv( trans, n, n, acoef, a, lda, e( 1, jvec ), 1,
295 $ zero, work( n*( jvec-1 )+1 ), 1 )
296 CALL sgemv( trans, n, n, -bcoefr, b, lda, e( 1, jvec ),
297 $ 1, one, work( n*( jvec-1 )+1 ), 1 )
304 result( 1 ) = ten / ulp
307 abmax = max( abs( salfr )+abs( salfi ), abs( sbeta ) )
308 IF( abs( salfr )+abs( salfi ).GT.alfmax .OR.
309 $ abs( sbeta ).GT.betmax .OR. abmax.LT.one )
THEN
310 scale = one / max( abmax, safmin )
315 scale = one / max( ( abs( salfr )+abs( salfi ) )*bnorm,
316 $ abs( sbeta )*anorm, safmin )
324 CALL sgemv( trans, n, n, acoef, a, lda, e( 1, jvec ), 1,
325 $ zero, work( n*( jvec-1 )+1 ), 1 )
326 CALL sgemv( trans, n, n, -bcoefr, b, lda, e( 1, jvec ),
327 $ 1, one, work( n*( jvec-1 )+1 ), 1 )
328 CALL sgemv( trans, n, n, bcoefi, b, lda, e( 1, jvec+1 ),
329 $ 1, one, work( n*( jvec-1 )+1 ), 1 )
331 CALL sgemv( trans, n, n, acoef, a, lda, e( 1, jvec+1 ),
332 $ 1, zero, work( n*jvec+1 ), 1 )
333 CALL sgemv( trans, n, n, -bcoefi, b, lda, e( 1, jvec ),
334 $ 1, one, work( n*jvec+1 ), 1 )
335 CALL sgemv( trans, n, n, -bcoefr, b, lda, e( 1, jvec+1 ),
336 $ 1, one, work( n*jvec+1 ), 1 )
341 errnrm = slange(
'One', n, n, work, n, work( n**2+1 ) ) / enorm
345 result( 1 ) = errnrm / ulp
356 IF( alphai( jvec ).EQ.zero )
THEN
358 temp1 = max( temp1, abs( e( j, jvec ) ) )
360 enrmer = max( enrmer, abs( temp1-one ) )
364 temp1 = max( temp1, abs( e( j, jvec ) )+
365 $ abs( e( j, jvec+1 ) ) )
367 enrmer = max( enrmer, abs( temp1-one ) )
374 result( 2 ) = enrmer / ( real( n )*ulp )
subroutine sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
SGEMV
subroutine sget52(left, n, a, lda, b, ldb, e, lde, alphar, alphai, beta, work, result)
SGET52