00001 SUBROUTINE CDRGSX( NSIZE, NCMAX, THRESH, NIN, NOUT, A, LDA, B,
00002 $ AI, BI, Z, Q, ALPHA, BETA, C, LDC, S, WORK,
00003 $ LWORK, RWORK, IWORK, LIWORK, BWORK, INFO )
00004
00005
00006
00007
00008
00009
00010 INTEGER INFO, LDA, LDC, LIWORK, LWORK, NCMAX, NIN,
00011 $ NOUT, NSIZE
00012 REAL THRESH
00013
00014
00015 LOGICAL BWORK( * )
00016 INTEGER IWORK( * )
00017 REAL RWORK( * ), S( * )
00018 COMPLEX A( LDA, * ), AI( LDA, * ), ALPHA( * ),
00019 $ B( LDA, * ), BETA( * ), BI( LDA, * ),
00020 $ C( LDC, * ), Q( LDA, * ), WORK( * ),
00021 $ Z( LDA, * )
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254 REAL ZERO, ONE, TEN
00255 PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0, TEN = 1.0E+1 )
00256 COMPLEX CZERO
00257 PARAMETER ( CZERO = ( 0.0E+0, 0.0E+0 ) )
00258
00259
00260 LOGICAL ILABAD
00261 CHARACTER SENSE
00262 INTEGER BDSPAC, I, IFUNC, J, LINFO, MAXWRK, MINWRK, MM,
00263 $ MN2, NERRS, NPTKNT, NTEST, NTESTT, PRTYPE, QBA,
00264 $ QBB
00265 REAL ABNRM, BIGNUM, DIFTRU, PLTRU, SMLNUM, TEMP1,
00266 $ TEMP2, THRSH2, ULP, ULPINV, WEIGHT
00267 COMPLEX X
00268
00269
00270 REAL DIFEST( 2 ), PL( 2 ), RESULT( 10 )
00271
00272
00273 LOGICAL CLCTSX
00274 INTEGER ILAENV
00275 REAL CLANGE, SLAMCH
00276 EXTERNAL CLCTSX, ILAENV, CLANGE, SLAMCH
00277
00278
00279 EXTERNAL ALASVM, CGESVD, CGET51, CGGESX, CLACPY, CLAKF2,
00280 $ CLASET, CLATM5, SLABAD, XERBLA
00281
00282
00283 LOGICAL FS
00284 INTEGER K, M, MPLUSN, N
00285
00286
00287 COMMON / MN / M, N, MPLUSN, K, FS
00288
00289
00290 INTRINSIC ABS, AIMAG, MAX, REAL, SQRT
00291
00292
00293 REAL ABS1
00294
00295
00296 ABS1( X ) = ABS( REAL( X ) ) + ABS( AIMAG( X ) )
00297
00298
00299
00300
00301
00302 IF( NSIZE.LT.0 ) THEN
00303 INFO = -1
00304 ELSE IF( THRESH.LT.ZERO ) THEN
00305 INFO = -2
00306 ELSE IF( NIN.LE.0 ) THEN
00307 INFO = -3
00308 ELSE IF( NOUT.LE.0 ) THEN
00309 INFO = -4
00310 ELSE IF( LDA.LT.1 .OR. LDA.LT.NSIZE ) THEN
00311 INFO = -6
00312 ELSE IF( LDC.LT.1 .OR. LDC.LT.NSIZE*NSIZE / 2 ) THEN
00313 INFO = -15
00314 ELSE IF( LIWORK.LT.NSIZE+2 ) THEN
00315 INFO = -21
00316 END IF
00317
00318
00319
00320
00321
00322
00323
00324
00325 MINWRK = 1
00326 IF( INFO.EQ.0 .AND. LWORK.GE.1 ) THEN
00327 MINWRK = 3*NSIZE*NSIZE / 2
00328
00329
00330
00331 MAXWRK = NSIZE*( 1+ILAENV( 1, 'CGEQRF', ' ', NSIZE, 1, NSIZE,
00332 $ 0 ) )
00333 MAXWRK = MAX( MAXWRK, NSIZE*( 1+ILAENV( 1, 'CUNGQR', ' ',
00334 $ NSIZE, 1, NSIZE, -1 ) ) )
00335
00336
00337
00338 BDSPAC = 3*NSIZE*NSIZE / 2
00339 MAXWRK = MAX( MAXWRK, NSIZE*NSIZE*
00340 $ ( 1+ILAENV( 1, 'CGEBRD', ' ', NSIZE*NSIZE / 2,
00341 $ NSIZE*NSIZE / 2, -1, -1 ) ) )
00342 MAXWRK = MAX( MAXWRK, BDSPAC )
00343
00344 MAXWRK = MAX( MAXWRK, MINWRK )
00345
00346 WORK( 1 ) = MAXWRK
00347 END IF
00348
00349 IF( LWORK.LT.MINWRK )
00350 $ INFO = -18
00351
00352 IF( INFO.NE.0 ) THEN
00353 CALL XERBLA( 'CDRGSX', -INFO )
00354 RETURN
00355 END IF
00356
00357
00358
00359 ULP = SLAMCH( 'P' )
00360 ULPINV = ONE / ULP
00361 SMLNUM = SLAMCH( 'S' ) / ULP
00362 BIGNUM = ONE / SMLNUM
00363 CALL SLABAD( SMLNUM, BIGNUM )
00364 THRSH2 = TEN*THRESH
00365 NTESTT = 0
00366 NERRS = 0
00367
00368
00369
00370 IFUNC = 0
00371 IF( NSIZE.EQ.0 )
00372 $ GO TO 70
00373
00374
00375
00376
00377
00378 PRTYPE = 0
00379 QBA = 3
00380 QBB = 4
00381 WEIGHT = SQRT( ULP )
00382
00383 DO 60 IFUNC = 0, 3
00384 DO 50 PRTYPE = 1, 5
00385 DO 40 M = 1, NSIZE - 1
00386 DO 30 N = 1, NSIZE - M
00387
00388 WEIGHT = ONE / WEIGHT
00389 MPLUSN = M + N
00390
00391
00392
00393 FS = .TRUE.
00394 K = 0
00395
00396 CALL CLASET( 'Full', MPLUSN, MPLUSN, CZERO, CZERO, AI,
00397 $ LDA )
00398 CALL CLASET( 'Full', MPLUSN, MPLUSN, CZERO, CZERO, BI,
00399 $ LDA )
00400
00401 CALL CLATM5( PRTYPE, M, N, AI, LDA, AI( M+1, M+1 ),
00402 $ LDA, AI( 1, M+1 ), LDA, BI, LDA,
00403 $ BI( M+1, M+1 ), LDA, BI( 1, M+1 ), LDA,
00404 $ Q, LDA, Z, LDA, WEIGHT, QBA, QBB )
00405
00406
00407
00408
00409
00410
00411 IF( IFUNC.EQ.0 ) THEN
00412 SENSE = 'N'
00413 ELSE IF( IFUNC.EQ.1 ) THEN
00414 SENSE = 'E'
00415 ELSE IF( IFUNC.EQ.2 ) THEN
00416 SENSE = 'V'
00417 ELSE IF( IFUNC.EQ.3 ) THEN
00418 SENSE = 'B'
00419 END IF
00420
00421 CALL CLACPY( 'Full', MPLUSN, MPLUSN, AI, LDA, A, LDA )
00422 CALL CLACPY( 'Full', MPLUSN, MPLUSN, BI, LDA, B, LDA )
00423
00424 CALL CGGESX( 'V', 'V', 'S', CLCTSX, SENSE, MPLUSN, AI,
00425 $ LDA, BI, LDA, MM, ALPHA, BETA, Q, LDA, Z,
00426 $ LDA, PL, DIFEST, WORK, LWORK, RWORK,
00427 $ IWORK, LIWORK, BWORK, LINFO )
00428
00429 IF( LINFO.NE.0 .AND. LINFO.NE.MPLUSN+2 ) THEN
00430 RESULT( 1 ) = ULPINV
00431 WRITE( NOUT, FMT = 9999 )'CGGESX', LINFO, MPLUSN,
00432 $ PRTYPE
00433 INFO = LINFO
00434 GO TO 30
00435 END IF
00436
00437
00438
00439 CALL CLACPY( 'Full', MPLUSN, MPLUSN, AI, LDA, WORK,
00440 $ MPLUSN )
00441 CALL CLACPY( 'Full', MPLUSN, MPLUSN, BI, LDA,
00442 $ WORK( MPLUSN*MPLUSN+1 ), MPLUSN )
00443 ABNRM = CLANGE( 'Fro', MPLUSN, 2*MPLUSN, WORK, MPLUSN,
00444 $ RWORK )
00445
00446
00447
00448 RESULT( 2 ) = ZERO
00449 CALL CGET51( 1, MPLUSN, A, LDA, AI, LDA, Q, LDA, Z,
00450 $ LDA, WORK, RWORK, RESULT( 1 ) )
00451 CALL CGET51( 1, MPLUSN, B, LDA, BI, LDA, Q, LDA, Z,
00452 $ LDA, WORK, RWORK, RESULT( 2 ) )
00453 CALL CGET51( 3, MPLUSN, B, LDA, BI, LDA, Q, LDA, Q,
00454 $ LDA, WORK, RWORK, RESULT( 3 ) )
00455 CALL CGET51( 3, MPLUSN, B, LDA, BI, LDA, Z, LDA, Z,
00456 $ LDA, WORK, RWORK, RESULT( 4 ) )
00457 NTEST = 4
00458
00459
00460
00461
00462 TEMP1 = ZERO
00463 RESULT( 5 ) = ZERO
00464 RESULT( 6 ) = ZERO
00465
00466 DO 10 J = 1, MPLUSN
00467 ILABAD = .FALSE.
00468 TEMP2 = ( ABS1( ALPHA( J )-AI( J, J ) ) /
00469 $ MAX( SMLNUM, ABS1( ALPHA( J ) ),
00470 $ ABS1( AI( J, J ) ) )+
00471 $ ABS1( BETA( J )-BI( J, J ) ) /
00472 $ MAX( SMLNUM, ABS1( BETA( J ) ),
00473 $ ABS1( BI( J, J ) ) ) ) / ULP
00474 IF( J.LT.MPLUSN ) THEN
00475 IF( AI( J+1, J ).NE.ZERO ) THEN
00476 ILABAD = .TRUE.
00477 RESULT( 5 ) = ULPINV
00478 END IF
00479 END IF
00480 IF( J.GT.1 ) THEN
00481 IF( AI( J, J-1 ).NE.ZERO ) THEN
00482 ILABAD = .TRUE.
00483 RESULT( 5 ) = ULPINV
00484 END IF
00485 END IF
00486 TEMP1 = MAX( TEMP1, TEMP2 )
00487 IF( ILABAD ) THEN
00488 WRITE( NOUT, FMT = 9997 )J, MPLUSN, PRTYPE
00489 END IF
00490 10 CONTINUE
00491 RESULT( 6 ) = TEMP1
00492 NTEST = NTEST + 2
00493
00494
00495
00496 RESULT( 7 ) = ZERO
00497 IF( LINFO.EQ.MPLUSN+3 ) THEN
00498 RESULT( 7 ) = ULPINV
00499 ELSE IF( MM.NE.N ) THEN
00500 RESULT( 7 ) = ULPINV
00501 END IF
00502 NTEST = NTEST + 1
00503
00504
00505
00506
00507 RESULT( 8 ) = ZERO
00508 MN2 = MM*( MPLUSN-MM )*2
00509 IF( IFUNC.GE.2 .AND. MN2.LE.NCMAX*NCMAX ) THEN
00510
00511
00512
00513
00514 CALL CLAKF2( MM, MPLUSN-MM, AI, LDA,
00515 $ AI( MM+1, MM+1 ), BI,
00516 $ BI( MM+1, MM+1 ), C, LDC )
00517
00518 CALL CGESVD( 'N', 'N', MN2, MN2, C, LDC, S, WORK,
00519 $ 1, WORK( 2 ), 1, WORK( 3 ), LWORK-2,
00520 $ RWORK, INFO )
00521 DIFTRU = S( MN2 )
00522
00523 IF( DIFEST( 2 ).EQ.ZERO ) THEN
00524 IF( DIFTRU.GT.ABNRM*ULP )
00525 $ RESULT( 8 ) = ULPINV
00526 ELSE IF( DIFTRU.EQ.ZERO ) THEN
00527 IF( DIFEST( 2 ).GT.ABNRM*ULP )
00528 $ RESULT( 8 ) = ULPINV
00529 ELSE IF( ( DIFTRU.GT.THRSH2*DIFEST( 2 ) ) .OR.
00530 $ ( DIFTRU*THRSH2.LT.DIFEST( 2 ) ) ) THEN
00531 RESULT( 8 ) = MAX( DIFTRU / DIFEST( 2 ),
00532 $ DIFEST( 2 ) / DIFTRU )
00533 END IF
00534 NTEST = NTEST + 1
00535 END IF
00536
00537
00538
00539 RESULT( 9 ) = ZERO
00540 IF( LINFO.EQ.( MPLUSN+2 ) ) THEN
00541 IF( DIFTRU.GT.ABNRM*ULP )
00542 $ RESULT( 9 ) = ULPINV
00543 IF( ( IFUNC.GT.1 ) .AND. ( DIFEST( 2 ).NE.ZERO ) )
00544 $ RESULT( 9 ) = ULPINV
00545 IF( ( IFUNC.EQ.1 ) .AND. ( PL( 1 ).NE.ZERO ) )
00546 $ RESULT( 9 ) = ULPINV
00547 NTEST = NTEST + 1
00548 END IF
00549
00550 NTESTT = NTESTT + NTEST
00551
00552
00553
00554 DO 20 J = 1, 9
00555 IF( RESULT( J ).GE.THRESH ) THEN
00556
00557
00558
00559
00560 IF( NERRS.EQ.0 ) THEN
00561 WRITE( NOUT, FMT = 9996 )'CGX'
00562
00563
00564
00565 WRITE( NOUT, FMT = 9994 )
00566
00567
00568
00569 WRITE( NOUT, FMT = 9993 )'unitary', '''',
00570 $ 'transpose', ( '''', I = 1, 4 )
00571
00572 END IF
00573 NERRS = NERRS + 1
00574 IF( RESULT( J ).LT.10000.0 ) THEN
00575 WRITE( NOUT, FMT = 9992 )MPLUSN, PRTYPE,
00576 $ WEIGHT, M, J, RESULT( J )
00577 ELSE
00578 WRITE( NOUT, FMT = 9991 )MPLUSN, PRTYPE,
00579 $ WEIGHT, M, J, RESULT( J )
00580 END IF
00581 END IF
00582 20 CONTINUE
00583
00584 30 CONTINUE
00585 40 CONTINUE
00586 50 CONTINUE
00587 60 CONTINUE
00588
00589 GO TO 150
00590
00591 70 CONTINUE
00592
00593
00594
00595
00596 NPTKNT = 0
00597
00598 80 CONTINUE
00599 READ( NIN, FMT = *, END = 140 )MPLUSN
00600 IF( MPLUSN.EQ.0 )
00601 $ GO TO 140
00602 READ( NIN, FMT = *, END = 140 )N
00603 DO 90 I = 1, MPLUSN
00604 READ( NIN, FMT = * )( AI( I, J ), J = 1, MPLUSN )
00605 90 CONTINUE
00606 DO 100 I = 1, MPLUSN
00607 READ( NIN, FMT = * )( BI( I, J ), J = 1, MPLUSN )
00608 100 CONTINUE
00609 READ( NIN, FMT = * )PLTRU, DIFTRU
00610
00611 NPTKNT = NPTKNT + 1
00612 FS = .TRUE.
00613 K = 0
00614 M = MPLUSN - N
00615
00616 CALL CLACPY( 'Full', MPLUSN, MPLUSN, AI, LDA, A, LDA )
00617 CALL CLACPY( 'Full', MPLUSN, MPLUSN, BI, LDA, B, LDA )
00618
00619
00620
00621
00622 CALL CGGESX( 'V', 'V', 'S', CLCTSX, 'B', MPLUSN, AI, LDA, BI, LDA,
00623 $ MM, ALPHA, BETA, Q, LDA, Z, LDA, PL, DIFEST, WORK,
00624 $ LWORK, RWORK, IWORK, LIWORK, BWORK, LINFO )
00625
00626 IF( LINFO.NE.0 .AND. LINFO.NE.MPLUSN+2 ) THEN
00627 RESULT( 1 ) = ULPINV
00628 WRITE( NOUT, FMT = 9998 )'CGGESX', LINFO, MPLUSN, NPTKNT
00629 GO TO 130
00630 END IF
00631
00632
00633
00634
00635 CALL CLACPY( 'Full', MPLUSN, MPLUSN, AI, LDA, WORK, MPLUSN )
00636 CALL CLACPY( 'Full', MPLUSN, MPLUSN, BI, LDA,
00637 $ WORK( MPLUSN*MPLUSN+1 ), MPLUSN )
00638 ABNRM = CLANGE( 'Fro', MPLUSN, 2*MPLUSN, WORK, MPLUSN, RWORK )
00639
00640
00641
00642 CALL CGET51( 1, MPLUSN, A, LDA, AI, LDA, Q, LDA, Z, LDA, WORK,
00643 $ RWORK, RESULT( 1 ) )
00644 CALL CGET51( 1, MPLUSN, B, LDA, BI, LDA, Q, LDA, Z, LDA, WORK,
00645 $ RWORK, RESULT( 2 ) )
00646 CALL CGET51( 3, MPLUSN, B, LDA, BI, LDA, Q, LDA, Q, LDA, WORK,
00647 $ RWORK, RESULT( 3 ) )
00648 CALL CGET51( 3, MPLUSN, B, LDA, BI, LDA, Z, LDA, Z, LDA, WORK,
00649 $ RWORK, RESULT( 4 ) )
00650
00651
00652
00653
00654 NTEST = 6
00655 TEMP1 = ZERO
00656 RESULT( 5 ) = ZERO
00657 RESULT( 6 ) = ZERO
00658
00659 DO 110 J = 1, MPLUSN
00660 ILABAD = .FALSE.
00661 TEMP2 = ( ABS1( ALPHA( J )-AI( J, J ) ) /
00662 $ MAX( SMLNUM, ABS1( ALPHA( J ) ), ABS1( AI( J, J ) ) )+
00663 $ ABS1( BETA( J )-BI( J, J ) ) /
00664 $ MAX( SMLNUM, ABS1( BETA( J ) ), ABS1( BI( J, J ) ) ) )
00665 $ / ULP
00666 IF( J.LT.MPLUSN ) THEN
00667 IF( AI( J+1, J ).NE.ZERO ) THEN
00668 ILABAD = .TRUE.
00669 RESULT( 5 ) = ULPINV
00670 END IF
00671 END IF
00672 IF( J.GT.1 ) THEN
00673 IF( AI( J, J-1 ).NE.ZERO ) THEN
00674 ILABAD = .TRUE.
00675 RESULT( 5 ) = ULPINV
00676 END IF
00677 END IF
00678 TEMP1 = MAX( TEMP1, TEMP2 )
00679 IF( ILABAD ) THEN
00680 WRITE( NOUT, FMT = 9997 )J, MPLUSN, NPTKNT
00681 END IF
00682 110 CONTINUE
00683 RESULT( 6 ) = TEMP1
00684
00685
00686
00687 NTEST = 7
00688 RESULT( 7 ) = ZERO
00689 IF( LINFO.EQ.MPLUSN+3 )
00690 $ RESULT( 7 ) = ULPINV
00691
00692
00693
00694 NTEST = 8
00695 RESULT( 8 ) = ZERO
00696 IF( DIFEST( 2 ).EQ.ZERO ) THEN
00697 IF( DIFTRU.GT.ABNRM*ULP )
00698 $ RESULT( 8 ) = ULPINV
00699 ELSE IF( DIFTRU.EQ.ZERO ) THEN
00700 IF( DIFEST( 2 ).GT.ABNRM*ULP )
00701 $ RESULT( 8 ) = ULPINV
00702 ELSE IF( ( DIFTRU.GT.THRSH2*DIFEST( 2 ) ) .OR.
00703 $ ( DIFTRU*THRSH2.LT.DIFEST( 2 ) ) ) THEN
00704 RESULT( 8 ) = MAX( DIFTRU / DIFEST( 2 ), DIFEST( 2 ) / DIFTRU )
00705 END IF
00706
00707
00708
00709 NTEST = 9
00710 RESULT( 9 ) = ZERO
00711 IF( LINFO.EQ.( MPLUSN+2 ) ) THEN
00712 IF( DIFTRU.GT.ABNRM*ULP )
00713 $ RESULT( 9 ) = ULPINV
00714 IF( ( IFUNC.GT.1 ) .AND. ( DIFEST( 2 ).NE.ZERO ) )
00715 $ RESULT( 9 ) = ULPINV
00716 IF( ( IFUNC.EQ.1 ) .AND. ( PL( 1 ).NE.ZERO ) )
00717 $ RESULT( 9 ) = ULPINV
00718 END IF
00719
00720
00721
00722 NTEST = 10
00723 RESULT( 10 ) = ZERO
00724 IF( PL( 1 ).EQ.ZERO ) THEN
00725 IF( PLTRU.GT.ABNRM*ULP )
00726 $ RESULT( 10 ) = ULPINV
00727 ELSE IF( PLTRU.EQ.ZERO ) THEN
00728 IF( PL( 1 ).GT.ABNRM*ULP )
00729 $ RESULT( 10 ) = ULPINV
00730 ELSE IF( ( PLTRU.GT.THRESH*PL( 1 ) ) .OR.
00731 $ ( PLTRU*THRESH.LT.PL( 1 ) ) ) THEN
00732 RESULT( 10 ) = ULPINV
00733 END IF
00734
00735 NTESTT = NTESTT + NTEST
00736
00737
00738
00739 DO 120 J = 1, NTEST
00740 IF( RESULT( J ).GE.THRESH ) THEN
00741
00742
00743
00744
00745 IF( NERRS.EQ.0 ) THEN
00746 WRITE( NOUT, FMT = 9996 )'CGX'
00747
00748
00749
00750 WRITE( NOUT, FMT = 9995 )
00751
00752
00753
00754 WRITE( NOUT, FMT = 9993 )'unitary', '''', 'transpose',
00755 $ ( '''', I = 1, 4 )
00756
00757 END IF
00758 NERRS = NERRS + 1
00759 IF( RESULT( J ).LT.10000.0 ) THEN
00760 WRITE( NOUT, FMT = 9990 )NPTKNT, MPLUSN, J, RESULT( J )
00761 ELSE
00762 WRITE( NOUT, FMT = 9989 )NPTKNT, MPLUSN, J, RESULT( J )
00763 END IF
00764 END IF
00765
00766 120 CONTINUE
00767
00768 130 CONTINUE
00769 GO TO 80
00770 140 CONTINUE
00771
00772 150 CONTINUE
00773
00774
00775
00776 CALL ALASVM( 'CGX', NOUT, NERRS, NTESTT, 0 )
00777
00778 WORK( 1 ) = MAXWRK
00779
00780 RETURN
00781
00782 9999 FORMAT( ' CDRGSX: ', A, ' returned INFO=', I6, '.', / 9X, 'N=',
00783 $ I6, ', JTYPE=', I6, ')' )
00784
00785 9998 FORMAT( ' CDRGSX: ', A, ' returned INFO=', I6, '.', / 9X, 'N=',
00786 $ I6, ', Input Example #', I2, ')' )
00787
00788 9997 FORMAT( ' CDRGSX: S not in Schur form at eigenvalue ', I6, '.',
00789 $ / 9X, 'N=', I6, ', JTYPE=', I6, ')' )
00790
00791 9996 FORMAT( / 1X, A3, ' -- Complex Expert Generalized Schur form',
00792 $ ' problem driver' )
00793
00794 9995 FORMAT( 'Input Example' )
00795
00796 9994 FORMAT( ' Matrix types: ', /
00797 $ ' 1: A is a block diagonal matrix of Jordan blocks ',
00798 $ 'and B is the identity ', / ' matrix, ',
00799 $ / ' 2: A and B are upper triangular matrices, ',
00800 $ / ' 3: A and B are as type 2, but each second diagonal ',
00801 $ 'block in A_11 and ', /
00802 $ ' each third diaongal block in A_22 are 2x2 blocks,',
00803 $ / ' 4: A and B are block diagonal matrices, ',
00804 $ / ' 5: (A,B) has potentially close or common ',
00805 $ 'eigenvalues.', / )
00806
00807 9993 FORMAT( / ' Tests performed: (S is Schur, T is triangular, ',
00808 $ 'Q and Z are ', A, ',', / 19X,
00809 $ ' a is alpha, b is beta, and ', A, ' means ', A, '.)',
00810 $ / ' 1 = | A - Q S Z', A,
00811 $ ' | / ( |A| n ulp ) 2 = | B - Q T Z', A,
00812 $ ' | / ( |B| n ulp )', / ' 3 = | I - QQ', A,
00813 $ ' | / ( n ulp ) 4 = | I - ZZ', A,
00814 $ ' | / ( n ulp )', / ' 5 = 1/ULP if A is not in ',
00815 $ 'Schur form S', / ' 6 = difference between (alpha,beta)',
00816 $ ' and diagonals of (S,T)', /
00817 $ ' 7 = 1/ULP if SDIM is not the correct number of ',
00818 $ 'selected eigenvalues', /
00819 $ ' 8 = 1/ULP if DIFEST/DIFTRU > 10*THRESH or ',
00820 $ 'DIFTRU/DIFEST > 10*THRESH',
00821 $ / ' 9 = 1/ULP if DIFEST <> 0 or DIFTRU > ULP*norm(A,B) ',
00822 $ 'when reordering fails', /
00823 $ ' 10 = 1/ULP if PLEST/PLTRU > THRESH or ',
00824 $ 'PLTRU/PLEST > THRESH', /
00825 $ ' ( Test 10 is only for input examples )', / )
00826 9992 FORMAT( ' Matrix order=', I2, ', type=', I2, ', a=', E10.4,
00827 $ ', order(A_11)=', I2, ', result ', I2, ' is ', 0P, F8.2 )
00828 9991 FORMAT( ' Matrix order=', I2, ', type=', I2, ', a=', E10.4,
00829 $ ', order(A_11)=', I2, ', result ', I2, ' is ', 0P, E10.4 )
00830 9990 FORMAT( ' Input example #', I2, ', matrix order=', I4, ',',
00831 $ ' result ', I2, ' is', 0P, F8.2 )
00832 9989 FORMAT( ' Input example #', I2, ', matrix order=', I4, ',',
00833 $ ' result ', I2, ' is', 1P, E10.3 )
00834
00835
00836
00837 END