127 SUBROUTINE sget53( A, LDA, B, LDB, SCALE, WR, WI, RESULT, INFO )
135 INTEGER INFO, LDA, LDB
136 REAL RESULT, SCALE, WI, WR
139 REAL A( lda, * ), B( ldb, * )
146 parameter ( zero = 0.0, one = 1.0 )
149 REAL ABSW, ANORM, BNORM, CI11, CI12, CI22, CNORM,
150 $ cr11, cr12, cr21, cr22, cscale, deti, detr, s1,
151 $ safmin, scales, sigmin, temp, ulp, wis, wrs
158 INTRINSIC abs, max, sqrt
172 safmin = slamch(
'Safe minimum' )
173 ulp = slamch(
'Epsilon' )*slamch(
'Base' )
174 absw = abs( wrs ) + abs( wis )
175 anorm = max( abs( a( 1, 1 ) )+abs( a( 2, 1 ) ),
176 $ abs( a( 1, 2 ) )+abs( a( 2, 2 ) ), safmin )
177 bnorm = max( abs( b( 1, 1 ) ), abs( b( 1, 2 ) )+abs( b( 2, 2 ) ),
182 temp = ( safmin*bnorm )*absw + ( safmin*anorm )*scales
183 IF( temp.GE.one )
THEN
192 absw = abs( wrs ) + abs( wis )
194 s1 = max( ulp*max( scales*anorm, absw*bnorm ),
195 $ safmin*max( scales, absw ) )
199 IF( s1.LT.safmin )
THEN
201 IF( scales.LT.safmin .AND. absw.LT.safmin )
THEN
209 temp = one / max( scales*anorm+absw*bnorm, safmin )
213 absw = abs( wrs ) + abs( wis )
214 s1 = max( ulp*max( scales*anorm, absw*bnorm ),
215 $ safmin*max( scales, absw ) )
216 IF( s1.LT.safmin )
THEN
225 cr11 = scales*a( 1, 1 ) - wrs*b( 1, 1 )
226 ci11 = -wis*b( 1, 1 )
227 cr21 = scales*a( 2, 1 )
228 cr12 = scales*a( 1, 2 ) - wrs*b( 1, 2 )
229 ci12 = -wis*b( 1, 2 )
230 cr22 = scales*a( 2, 2 ) - wrs*b( 2, 2 )
231 ci22 = -wis*b( 2, 2 )
239 cnorm = max( abs( cr11 )+abs( ci11 )+abs( cr21 ),
240 $ abs( cr12 )+abs( ci12 )+abs( cr22 )+abs( ci22 ), safmin )
241 cscale = one / sqrt( cnorm )
242 detr = ( cscale*cr11 )*( cscale*cr22 ) -
243 $ ( cscale*ci11 )*( cscale*ci22 ) -
244 $ ( cscale*cr12 )*( cscale*cr21 )
245 deti = ( cscale*cr11 )*( cscale*ci22 ) +
246 $ ( cscale*ci11 )*( cscale*cr22 ) -
247 $ ( cscale*ci12 )*( cscale*cr21 )
248 sigmin = abs( detr ) + abs( deti )
subroutine sget53(A, LDA, B, LDB, SCALE, WR, WI, RESULT, INFO)
SGET53