81 SUBROUTINE dget34( RMAX, LMAX, NINFO, KNT )
98 DOUBLE PRECISION ZERO, HALF, ONE
99 parameter( zero = 0.0d0, half = 0.5d0, one = 1.0d0 )
100 DOUBLE PRECISION TWO, THREE
101 parameter( two = 2.0d0, three = 3.0d0 )
103 parameter( lwork = 32 )
106 INTEGER I, IA, IA11, IA12, IA21, IA22, IAM, IB, IC,
107 $ IC11, IC12, IC21, IC22, ICM, INFO, J
108 DOUBLE PRECISION BIGNUM, EPS, RES, SMLNUM, TNRM
111 DOUBLE PRECISION Q( 4, 4 ), RESULT( 2 ), T( 4, 4 ), T1( 4, 4 ),
112 $ VAL( 9 ), VM( 2 ), WORK( LWORK )
115 DOUBLE PRECISION DLAMCH
122 INTRINSIC abs, dble, max, sign, sqrt
129 smlnum = dlamch(
'S' ) / eps
130 bignum = one / smlnum
135 val( 2 ) = sqrt( smlnum )
138 val( 5 ) = sqrt( bignum )
139 val( 6 ) = -sqrt( smlnum )
142 val( 9 ) = -sqrt( bignum )
144 vm( 2 ) = one + two*eps
145 CALL dcopy( 16, val( 4 ), 0, t( 1, 1 ), 1 )
159 t( 1, 1 ) = val( ia )*vm( iam )
160 t( 2, 2 ) = val( ic )
161 t( 1, 2 ) = val( ib )
163 tnrm = max( abs( t( 1, 1 ) ), abs( t( 2, 2 ) ),
165 CALL dcopy( 16, t, 1, t1, 1 )
166 CALL dcopy( 16, val( 1 ), 0, q, 1 )
167 CALL dcopy( 4, val( 3 ), 0, q, 5 )
168 CALL dlaexc( .true., 2, t, 4, q, 4, 1, 1, 1, work,
171 $ ninfo( info ) = ninfo( info ) + 1
172 CALL dhst01( 2, 1, 2, t1, 4, t, 4, q, 4, work, lwork,
174 res = result( 1 ) + result( 2 )
176 $ res = res + one / eps
177 IF( t( 1, 1 ).NE.t1( 2, 2 ) )
178 $ res = res + one / eps
179 IF( t( 2, 2 ).NE.t1( 1, 1 ) )
180 $ res = res + one / eps
181 IF( t( 2, 1 ).NE.zero )
182 $ res = res + one / eps
184 IF( res.GT.rmax )
THEN
199 DO 50 ic22 = -1, 1, 2
200 t( 1, 1 ) = val( ia )*vm( iam )
201 t( 1, 2 ) = val( ib )
202 t( 1, 3 ) = -two*val( ib )
204 t( 2, 2 ) = val( ic11 )
205 t( 2, 3 ) = val( ic12 )
207 t( 3, 2 ) = -val( ic21 )
208 t( 3, 3 ) = val( ic11 )*dble( ic22 )
209 tnrm = max( abs( t( 1, 1 ) ),
210 $ abs( t( 1, 2 ) ), abs( t( 1, 3 ) ),
211 $ abs( t( 2, 2 ) ), abs( t( 2, 3 ) ),
212 $ abs( t( 3, 2 ) ), abs( t( 3, 3 ) ) )
213 CALL dcopy( 16, t, 1, t1, 1 )
214 CALL dcopy( 16, val( 1 ), 0, q, 1 )
215 CALL dcopy( 4, val( 3 ), 0, q, 5 )
216 CALL dlaexc( .true., 3, t, 4, q, 4, 1, 1, 2,
219 $ ninfo( info ) = ninfo( info ) + 1
220 CALL dhst01( 3, 1, 3, t1, 4, t, 4, q, 4,
221 $ work, lwork, result )
222 res = result( 1 ) + result( 2 )
224 IF( t1( 1, 1 ).NE.t( 3, 3 ) )
225 $ res = res + one / eps
226 IF( t( 3, 1 ).NE.zero )
227 $ res = res + one / eps
228 IF( t( 3, 2 ).NE.zero )
229 $ res = res + one / eps
230 IF( t( 2, 1 ).NE.0 .AND.
231 $ ( t( 1, 1 ).NE.t( 2,
232 $ 2 ) .OR. sign( one, t( 1,
233 $ 2 ) ).EQ.sign( one, t( 2, 1 ) ) ) )
234 $ res = res + one / eps
237 IF( res.GT.rmax )
THEN
252 DO 150 ia22 = -1, 1, 2
256 t( 1, 1 ) = val( ia11 )
257 t( 1, 2 ) = val( ia12 )
258 t( 1, 3 ) = -two*val( ib )
259 t( 2, 1 ) = -val( ia21 )
260 t( 2, 2 ) = val( ia11 )*dble( ia22 )
261 t( 2, 3 ) = val( ib )
264 t( 3, 3 ) = val( ic )*vm( icm )
265 tnrm = max( abs( t( 1, 1 ) ),
266 $ abs( t( 1, 2 ) ), abs( t( 1, 3 ) ),
267 $ abs( t( 2, 2 ) ), abs( t( 2, 3 ) ),
268 $ abs( t( 3, 2 ) ), abs( t( 3, 3 ) ) )
269 CALL dcopy( 16, t, 1, t1, 1 )
270 CALL dcopy( 16, val( 1 ), 0, q, 1 )
271 CALL dcopy( 4, val( 3 ), 0, q, 5 )
272 CALL dlaexc( .true., 3, t, 4, q, 4, 1, 2, 1,
275 $ ninfo( info ) = ninfo( info ) + 1
276 CALL dhst01( 3, 1, 3, t1, 4, t, 4, q, 4,
277 $ work, lwork, result )
278 res = result( 1 ) + result( 2 )
280 IF( t1( 3, 3 ).NE.t( 1, 1 ) )
281 $ res = res + one / eps
282 IF( t( 2, 1 ).NE.zero )
283 $ res = res + one / eps
284 IF( t( 3, 1 ).NE.zero )
285 $ res = res + one / eps
286 IF( t( 3, 2 ).NE.0 .AND.
287 $ ( t( 2, 2 ).NE.t( 3,
288 $ 3 ) .OR. sign( one, t( 2,
289 $ 3 ) ).EQ.sign( one, t( 3, 2 ) ) ) )
290 $ res = res + one / eps
293 IF( res.GT.rmax )
THEN
308 DO 270 ia22 = -1, 1, 2
313 DO 220 ic22 = -1, 1, 2
316 t( 1, 1 ) = val( ia11 )*vm( iam )
317 t( 1, 2 ) = val( ia12 )*vm( iam )
318 t( 1, 3 ) = -two*val( ib )
319 t( 1, 4 ) = half*val( ib )
320 t( 2, 1 ) = -t( 1, 2 )*val( ia21 )
321 t( 2, 2 ) = val( ia11 )*
322 $ dble( ia22 )*vm( iam )
323 t( 2, 3 ) = val( ib )
324 t( 2, 4 ) = three*val( ib )
327 t( 3, 3 ) = val( ic11 )*
329 t( 3, 4 ) = val( ic12 )*
333 t( 4, 3 ) = -t( 3, 4 )*val( ic21 )*
335 t( 4, 4 ) = val( ic11 )*
345 CALL dcopy( 16, t, 1, t1, 1 )
346 CALL dcopy( 16, val( 1 ), 0, q, 1 )
347 CALL dcopy( 4, val( 3 ), 0, q, 5 )
348 CALL dlaexc( .true., 4, t, 4, q, 4,
349 $ 1, 2, 2, work, info )
351 $ ninfo( info ) = ninfo( info ) + 1
352 CALL dhst01( 4, 1, 4, t1, 4, t, 4,
355 res = result( 1 ) + result( 2 )
357 IF( t( 3, 1 ).NE.zero )
358 $ res = res + one / eps
359 IF( t( 4, 1 ).NE.zero )
360 $ res = res + one / eps
361 IF( t( 3, 2 ).NE.zero )
362 $ res = res + one / eps
363 IF( t( 4, 2 ).NE.zero )
364 $ res = res + one / eps
365 IF( t( 2, 1 ).NE.0 .AND.
366 $ ( t( 1, 1 ).NE.t( 2,
367 $ 2 ) .OR. sign( one, t( 1,
368 $ 2 ) ).EQ.sign( one, t( 2,
369 $ 1 ) ) ) )res = res +
371 IF( t( 4, 3 ).NE.0 .AND.
372 $ ( t( 3, 3 ).NE.t( 4,
373 $ 4 ) .OR. sign( one, t( 3,
374 $ 4 ) ).EQ.sign( one, t( 4,
375 $ 3 ) ) ) )res = res +
379 IF( res.GT.rmax )
THEN
subroutine dget34(rmax, lmax, ninfo, knt)
DGET34
subroutine dhst01(n, ilo, ihi, a, lda, h, ldh, q, ldq, work, lwork, result)
DHST01
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dlaexc(wantq, n, t, ldt, q, ldq, j1, n1, n2, work, info)
DLAEXC swaps adjacent diagonal blocks of a real upper quasi-triangular matrix in Schur canonical form...