00001 SUBROUTINE SGET24( COMP, JTYPE, THRESH, ISEED, NOUNIT, N, A, LDA,
00002 $ H, HT, WR, WI, WRT, WIT, WRTMP, WITMP, VS,
00003 $ LDVS, VS1, RCDEIN, RCDVIN, NSLCT, ISLCT,
00004 $ RESULT, WORK, LWORK, IWORK, BWORK, INFO )
00005
00006
00007
00008
00009
00010
00011 LOGICAL COMP
00012 INTEGER INFO, JTYPE, LDA, LDVS, LWORK, N, NOUNIT, NSLCT
00013 REAL RCDEIN, RCDVIN, THRESH
00014
00015
00016 LOGICAL BWORK( * )
00017 INTEGER ISEED( 4 ), ISLCT( * ), IWORK( * )
00018 REAL A( LDA, * ), H( LDA, * ), HT( LDA, * ),
00019 $ RESULT( 17 ), VS( LDVS, * ), VS1( LDVS, * ),
00020 $ WI( * ), WIT( * ), WITMP( * ), WORK( * ),
00021 $ WR( * ), WRT( * ), WRTMP( * )
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 REAL ZERO, ONE
00229 PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 )
00230 REAL EPSIN
00231 PARAMETER ( EPSIN = 5.9605E-8 )
00232
00233
00234 CHARACTER SORT
00235 INTEGER I, IINFO, ISORT, ITMP, J, KMIN, KNTEIG, LIWORK,
00236 $ RSUB, SDIM, SDIM1
00237 REAL ANORM, EPS, RCNDE1, RCNDV1, RCONDE, RCONDV,
00238 $ SMLNUM, TMP, TOL, TOLIN, ULP, ULPINV, V, VIMIN,
00239 $ VRMIN, WNORM
00240
00241
00242 INTEGER IPNT( 20 )
00243
00244
00245 LOGICAL SELVAL( 20 )
00246 REAL SELWI( 20 ), SELWR( 20 )
00247
00248
00249 INTEGER SELDIM, SELOPT
00250
00251
00252 COMMON / SSLCT / SELOPT, SELDIM, SELVAL, SELWR, SELWI
00253
00254
00255 LOGICAL SSLECT
00256 REAL SLAMCH, SLANGE
00257 EXTERNAL SSLECT, SLAMCH, SLANGE
00258
00259
00260 EXTERNAL SCOPY, SGEESX, SGEMM, SLACPY, SORT01, XERBLA
00261
00262
00263 INTRINSIC ABS, MAX, MIN, REAL, SIGN, SQRT
00264
00265
00266
00267
00268
00269 INFO = 0
00270 IF( THRESH.LT.ZERO ) THEN
00271 INFO = -3
00272 ELSE IF( NOUNIT.LE.0 ) THEN
00273 INFO = -5
00274 ELSE IF( N.LT.0 ) THEN
00275 INFO = -6
00276 ELSE IF( LDA.LT.1 .OR. LDA.LT.N ) THEN
00277 INFO = -8
00278 ELSE IF( LDVS.LT.1 .OR. LDVS.LT.N ) THEN
00279 INFO = -18
00280 ELSE IF( LWORK.LT.3*N ) THEN
00281 INFO = -26
00282 END IF
00283
00284 IF( INFO.NE.0 ) THEN
00285 CALL XERBLA( 'SGET24', -INFO )
00286 RETURN
00287 END IF
00288
00289
00290
00291 DO 10 I = 1, 17
00292 RESULT( I ) = -ONE
00293 10 CONTINUE
00294
00295 IF( N.EQ.0 )
00296 $ RETURN
00297
00298
00299
00300 SMLNUM = SLAMCH( 'Safe minimum' )
00301 ULP = SLAMCH( 'Precision' )
00302 ULPINV = ONE / ULP
00303
00304
00305
00306 SELOPT = 0
00307 LIWORK = N*N
00308 DO 120 ISORT = 0, 1
00309 IF( ISORT.EQ.0 ) THEN
00310 SORT = 'N'
00311 RSUB = 0
00312 ELSE
00313 SORT = 'S'
00314 RSUB = 6
00315 END IF
00316
00317
00318
00319 CALL SLACPY( 'F', N, N, A, LDA, H, LDA )
00320 CALL SGEESX( 'V', SORT, SSLECT, 'N', N, H, LDA, SDIM, WR, WI,
00321 $ VS, LDVS, RCONDE, RCONDV, WORK, LWORK, IWORK,
00322 $ LIWORK, BWORK, IINFO )
00323 IF( IINFO.NE.0 .AND. IINFO.NE.N+2 ) THEN
00324 RESULT( 1+RSUB ) = ULPINV
00325 IF( JTYPE.NE.22 ) THEN
00326 WRITE( NOUNIT, FMT = 9998 )'SGEESX1', IINFO, N, JTYPE,
00327 $ ISEED
00328 ELSE
00329 WRITE( NOUNIT, FMT = 9999 )'SGEESX1', IINFO, N,
00330 $ ISEED( 1 )
00331 END IF
00332 INFO = ABS( IINFO )
00333 RETURN
00334 END IF
00335 IF( ISORT.EQ.0 ) THEN
00336 CALL SCOPY( N, WR, 1, WRTMP, 1 )
00337 CALL SCOPY( N, WI, 1, WITMP, 1 )
00338 END IF
00339
00340
00341
00342 RESULT( 1+RSUB ) = ZERO
00343 DO 30 J = 1, N - 2
00344 DO 20 I = J + 2, N
00345 IF( H( I, J ).NE.ZERO )
00346 $ RESULT( 1+RSUB ) = ULPINV
00347 20 CONTINUE
00348 30 CONTINUE
00349 DO 40 I = 1, N - 2
00350 IF( H( I+1, I ).NE.ZERO .AND. H( I+2, I+1 ).NE.ZERO )
00351 $ RESULT( 1+RSUB ) = ULPINV
00352 40 CONTINUE
00353 DO 50 I = 1, N - 1
00354 IF( H( I+1, I ).NE.ZERO ) THEN
00355 IF( H( I, I ).NE.H( I+1, I+1 ) .OR. H( I, I+1 ).EQ.
00356 $ ZERO .OR. SIGN( ONE, H( I+1, I ) ).EQ.
00357 $ SIGN( ONE, H( I, I+1 ) ) )RESULT( 1+RSUB ) = ULPINV
00358 END IF
00359 50 CONTINUE
00360
00361
00362
00363
00364
00365 CALL SLACPY( ' ', N, N, A, LDA, VS1, LDVS )
00366
00367
00368
00369 CALL SGEMM( 'No transpose', 'No transpose', N, N, N, ONE, VS,
00370 $ LDVS, H, LDA, ZERO, HT, LDA )
00371
00372
00373
00374 CALL SGEMM( 'No transpose', 'Transpose', N, N, N, -ONE, HT,
00375 $ LDA, VS, LDVS, ONE, VS1, LDVS )
00376
00377 ANORM = MAX( SLANGE( '1', N, N, A, LDA, WORK ), SMLNUM )
00378 WNORM = SLANGE( '1', N, N, VS1, LDVS, WORK )
00379
00380 IF( ANORM.GT.WNORM ) THEN
00381 RESULT( 2+RSUB ) = ( WNORM / ANORM ) / ( N*ULP )
00382 ELSE
00383 IF( ANORM.LT.ONE ) THEN
00384 RESULT( 2+RSUB ) = ( MIN( WNORM, N*ANORM ) / ANORM ) /
00385 $ ( N*ULP )
00386 ELSE
00387 RESULT( 2+RSUB ) = MIN( WNORM / ANORM, REAL( N ) ) /
00388 $ ( N*ULP )
00389 END IF
00390 END IF
00391
00392
00393
00394 CALL SORT01( 'Columns', N, N, VS, LDVS, WORK, LWORK,
00395 $ RESULT( 3+RSUB ) )
00396
00397
00398
00399 RESULT( 4+RSUB ) = ZERO
00400 DO 60 I = 1, N
00401 IF( H( I, I ).NE.WR( I ) )
00402 $ RESULT( 4+RSUB ) = ULPINV
00403 60 CONTINUE
00404 IF( N.GT.1 ) THEN
00405 IF( H( 2, 1 ).EQ.ZERO .AND. WI( 1 ).NE.ZERO )
00406 $ RESULT( 4+RSUB ) = ULPINV
00407 IF( H( N, N-1 ).EQ.ZERO .AND. WI( N ).NE.ZERO )
00408 $ RESULT( 4+RSUB ) = ULPINV
00409 END IF
00410 DO 70 I = 1, N - 1
00411 IF( H( I+1, I ).NE.ZERO ) THEN
00412 TMP = SQRT( ABS( H( I+1, I ) ) )*
00413 $ SQRT( ABS( H( I, I+1 ) ) )
00414 RESULT( 4+RSUB ) = MAX( RESULT( 4+RSUB ),
00415 $ ABS( WI( I )-TMP ) /
00416 $ MAX( ULP*TMP, SMLNUM ) )
00417 RESULT( 4+RSUB ) = MAX( RESULT( 4+RSUB ),
00418 $ ABS( WI( I+1 )+TMP ) /
00419 $ MAX( ULP*TMP, SMLNUM ) )
00420 ELSE IF( I.GT.1 ) THEN
00421 IF( H( I+1, I ).EQ.ZERO .AND. H( I, I-1 ).EQ.ZERO .AND.
00422 $ WI( I ).NE.ZERO )RESULT( 4+RSUB ) = ULPINV
00423 END IF
00424 70 CONTINUE
00425
00426
00427
00428 CALL SLACPY( 'F', N, N, A, LDA, HT, LDA )
00429 CALL SGEESX( 'N', SORT, SSLECT, 'N', N, HT, LDA, SDIM, WRT,
00430 $ WIT, VS, LDVS, RCONDE, RCONDV, WORK, LWORK, IWORK,
00431 $ LIWORK, BWORK, IINFO )
00432 IF( IINFO.NE.0 .AND. IINFO.NE.N+2 ) THEN
00433 RESULT( 5+RSUB ) = ULPINV
00434 IF( JTYPE.NE.22 ) THEN
00435 WRITE( NOUNIT, FMT = 9998 )'SGEESX2', IINFO, N, JTYPE,
00436 $ ISEED
00437 ELSE
00438 WRITE( NOUNIT, FMT = 9999 )'SGEESX2', IINFO, N,
00439 $ ISEED( 1 )
00440 END IF
00441 INFO = ABS( IINFO )
00442 GO TO 250
00443 END IF
00444
00445 RESULT( 5+RSUB ) = ZERO
00446 DO 90 J = 1, N
00447 DO 80 I = 1, N
00448 IF( H( I, J ).NE.HT( I, J ) )
00449 $ RESULT( 5+RSUB ) = ULPINV
00450 80 CONTINUE
00451 90 CONTINUE
00452
00453
00454
00455 RESULT( 6+RSUB ) = ZERO
00456 DO 100 I = 1, N
00457 IF( WR( I ).NE.WRT( I ) .OR. WI( I ).NE.WIT( I ) )
00458 $ RESULT( 6+RSUB ) = ULPINV
00459 100 CONTINUE
00460
00461
00462
00463 IF( ISORT.EQ.1 ) THEN
00464 RESULT( 13 ) = ZERO
00465 KNTEIG = 0
00466 DO 110 I = 1, N
00467 IF( SSLECT( WR( I ), WI( I ) ) .OR.
00468 $ SSLECT( WR( I ), -WI( I ) ) )KNTEIG = KNTEIG + 1
00469 IF( I.LT.N ) THEN
00470 IF( ( SSLECT( WR( I+1 ), WI( I+1 ) ) .OR.
00471 $ SSLECT( WR( I+1 ), -WI( I+1 ) ) ) .AND.
00472 $ ( .NOT.( SSLECT( WR( I ),
00473 $ WI( I ) ) .OR. SSLECT( WR( I ),
00474 $ -WI( I ) ) ) ) .AND. IINFO.NE.N+2 )RESULT( 13 )
00475 $ = ULPINV
00476 END IF
00477 110 CONTINUE
00478 IF( SDIM.NE.KNTEIG )
00479 $ RESULT( 13 ) = ULPINV
00480 END IF
00481
00482 120 CONTINUE
00483
00484
00485
00486
00487 IF( LWORK.GE.N+( N*N ) / 2 ) THEN
00488
00489
00490
00491 SORT = 'S'
00492 RESULT( 14 ) = ZERO
00493 RESULT( 15 ) = ZERO
00494 CALL SLACPY( 'F', N, N, A, LDA, HT, LDA )
00495 CALL SGEESX( 'V', SORT, SSLECT, 'B', N, HT, LDA, SDIM1, WRT,
00496 $ WIT, VS1, LDVS, RCONDE, RCONDV, WORK, LWORK,
00497 $ IWORK, LIWORK, BWORK, IINFO )
00498 IF( IINFO.NE.0 .AND. IINFO.NE.N+2 ) THEN
00499 RESULT( 14 ) = ULPINV
00500 RESULT( 15 ) = ULPINV
00501 IF( JTYPE.NE.22 ) THEN
00502 WRITE( NOUNIT, FMT = 9998 )'SGEESX3', IINFO, N, JTYPE,
00503 $ ISEED
00504 ELSE
00505 WRITE( NOUNIT, FMT = 9999 )'SGEESX3', IINFO, N,
00506 $ ISEED( 1 )
00507 END IF
00508 INFO = ABS( IINFO )
00509 GO TO 250
00510 END IF
00511
00512
00513
00514 DO 140 I = 1, N
00515 IF( WR( I ).NE.WRT( I ) .OR. WI( I ).NE.WIT( I ) )
00516 $ RESULT( 10 ) = ULPINV
00517 DO 130 J = 1, N
00518 IF( H( I, J ).NE.HT( I, J ) )
00519 $ RESULT( 11 ) = ULPINV
00520 IF( VS( I, J ).NE.VS1( I, J ) )
00521 $ RESULT( 12 ) = ULPINV
00522 130 CONTINUE
00523 140 CONTINUE
00524 IF( SDIM.NE.SDIM1 )
00525 $ RESULT( 13 ) = ULPINV
00526
00527
00528
00529 CALL SLACPY( 'F', N, N, A, LDA, HT, LDA )
00530 CALL SGEESX( 'N', SORT, SSLECT, 'B', N, HT, LDA, SDIM1, WRT,
00531 $ WIT, VS1, LDVS, RCNDE1, RCNDV1, WORK, LWORK,
00532 $ IWORK, LIWORK, BWORK, IINFO )
00533 IF( IINFO.NE.0 .AND. IINFO.NE.N+2 ) THEN
00534 RESULT( 14 ) = ULPINV
00535 RESULT( 15 ) = ULPINV
00536 IF( JTYPE.NE.22 ) THEN
00537 WRITE( NOUNIT, FMT = 9998 )'SGEESX4', IINFO, N, JTYPE,
00538 $ ISEED
00539 ELSE
00540 WRITE( NOUNIT, FMT = 9999 )'SGEESX4', IINFO, N,
00541 $ ISEED( 1 )
00542 END IF
00543 INFO = ABS( IINFO )
00544 GO TO 250
00545 END IF
00546
00547
00548
00549 IF( RCNDE1.NE.RCONDE )
00550 $ RESULT( 14 ) = ULPINV
00551 IF( RCNDV1.NE.RCONDV )
00552 $ RESULT( 15 ) = ULPINV
00553
00554
00555
00556 DO 160 I = 1, N
00557 IF( WR( I ).NE.WRT( I ) .OR. WI( I ).NE.WIT( I ) )
00558 $ RESULT( 10 ) = ULPINV
00559 DO 150 J = 1, N
00560 IF( H( I, J ).NE.HT( I, J ) )
00561 $ RESULT( 11 ) = ULPINV
00562 IF( VS( I, J ).NE.VS1( I, J ) )
00563 $ RESULT( 12 ) = ULPINV
00564 150 CONTINUE
00565 160 CONTINUE
00566 IF( SDIM.NE.SDIM1 )
00567 $ RESULT( 13 ) = ULPINV
00568
00569
00570
00571 CALL SLACPY( 'F', N, N, A, LDA, HT, LDA )
00572 CALL SGEESX( 'V', SORT, SSLECT, 'E', N, HT, LDA, SDIM1, WRT,
00573 $ WIT, VS1, LDVS, RCNDE1, RCNDV1, WORK, LWORK,
00574 $ IWORK, LIWORK, BWORK, IINFO )
00575 IF( IINFO.NE.0 .AND. IINFO.NE.N+2 ) THEN
00576 RESULT( 14 ) = ULPINV
00577 IF( JTYPE.NE.22 ) THEN
00578 WRITE( NOUNIT, FMT = 9998 )'SGEESX5', IINFO, N, JTYPE,
00579 $ ISEED
00580 ELSE
00581 WRITE( NOUNIT, FMT = 9999 )'SGEESX5', IINFO, N,
00582 $ ISEED( 1 )
00583 END IF
00584 INFO = ABS( IINFO )
00585 GO TO 250
00586 END IF
00587
00588
00589
00590 IF( RCNDE1.NE.RCONDE )
00591 $ RESULT( 14 ) = ULPINV
00592
00593
00594
00595 DO 180 I = 1, N
00596 IF( WR( I ).NE.WRT( I ) .OR. WI( I ).NE.WIT( I ) )
00597 $ RESULT( 10 ) = ULPINV
00598 DO 170 J = 1, N
00599 IF( H( I, J ).NE.HT( I, J ) )
00600 $ RESULT( 11 ) = ULPINV
00601 IF( VS( I, J ).NE.VS1( I, J ) )
00602 $ RESULT( 12 ) = ULPINV
00603 170 CONTINUE
00604 180 CONTINUE
00605 IF( SDIM.NE.SDIM1 )
00606 $ RESULT( 13 ) = ULPINV
00607
00608
00609
00610 CALL SLACPY( 'F', N, N, A, LDA, HT, LDA )
00611 CALL SGEESX( 'N', SORT, SSLECT, 'E', N, HT, LDA, SDIM1, WRT,
00612 $ WIT, VS1, LDVS, RCNDE1, RCNDV1, WORK, LWORK,
00613 $ IWORK, LIWORK, BWORK, IINFO )
00614 IF( IINFO.NE.0 .AND. IINFO.NE.N+2 ) THEN
00615 RESULT( 14 ) = ULPINV
00616 IF( JTYPE.NE.22 ) THEN
00617 WRITE( NOUNIT, FMT = 9998 )'SGEESX6', IINFO, N, JTYPE,
00618 $ ISEED
00619 ELSE
00620 WRITE( NOUNIT, FMT = 9999 )'SGEESX6', IINFO, N,
00621 $ ISEED( 1 )
00622 END IF
00623 INFO = ABS( IINFO )
00624 GO TO 250
00625 END IF
00626
00627
00628
00629 IF( RCNDE1.NE.RCONDE )
00630 $ RESULT( 14 ) = ULPINV
00631
00632
00633
00634 DO 200 I = 1, N
00635 IF( WR( I ).NE.WRT( I ) .OR. WI( I ).NE.WIT( I ) )
00636 $ RESULT( 10 ) = ULPINV
00637 DO 190 J = 1, N
00638 IF( H( I, J ).NE.HT( I, J ) )
00639 $ RESULT( 11 ) = ULPINV
00640 IF( VS( I, J ).NE.VS1( I, J ) )
00641 $ RESULT( 12 ) = ULPINV
00642 190 CONTINUE
00643 200 CONTINUE
00644 IF( SDIM.NE.SDIM1 )
00645 $ RESULT( 13 ) = ULPINV
00646
00647
00648
00649 CALL SLACPY( 'F', N, N, A, LDA, HT, LDA )
00650 CALL SGEESX( 'V', SORT, SSLECT, 'V', N, HT, LDA, SDIM1, WRT,
00651 $ WIT, VS1, LDVS, RCNDE1, RCNDV1, WORK, LWORK,
00652 $ IWORK, LIWORK, BWORK, IINFO )
00653 IF( IINFO.NE.0 .AND. IINFO.NE.N+2 ) THEN
00654 RESULT( 15 ) = ULPINV
00655 IF( JTYPE.NE.22 ) THEN
00656 WRITE( NOUNIT, FMT = 9998 )'SGEESX7', IINFO, N, JTYPE,
00657 $ ISEED
00658 ELSE
00659 WRITE( NOUNIT, FMT = 9999 )'SGEESX7', IINFO, N,
00660 $ ISEED( 1 )
00661 END IF
00662 INFO = ABS( IINFO )
00663 GO TO 250
00664 END IF
00665
00666
00667
00668 IF( RCNDV1.NE.RCONDV )
00669 $ RESULT( 15 ) = ULPINV
00670
00671
00672
00673 DO 220 I = 1, N
00674 IF( WR( I ).NE.WRT( I ) .OR. WI( I ).NE.WIT( I ) )
00675 $ RESULT( 10 ) = ULPINV
00676 DO 210 J = 1, N
00677 IF( H( I, J ).NE.HT( I, J ) )
00678 $ RESULT( 11 ) = ULPINV
00679 IF( VS( I, J ).NE.VS1( I, J ) )
00680 $ RESULT( 12 ) = ULPINV
00681 210 CONTINUE
00682 220 CONTINUE
00683 IF( SDIM.NE.SDIM1 )
00684 $ RESULT( 13 ) = ULPINV
00685
00686
00687
00688 CALL SLACPY( 'F', N, N, A, LDA, HT, LDA )
00689 CALL SGEESX( 'N', SORT, SSLECT, 'V', N, HT, LDA, SDIM1, WRT,
00690 $ WIT, VS1, LDVS, RCNDE1, RCNDV1, WORK, LWORK,
00691 $ IWORK, LIWORK, BWORK, IINFO )
00692 IF( IINFO.NE.0 .AND. IINFO.NE.N+2 ) THEN
00693 RESULT( 15 ) = ULPINV
00694 IF( JTYPE.NE.22 ) THEN
00695 WRITE( NOUNIT, FMT = 9998 )'SGEESX8', IINFO, N, JTYPE,
00696 $ ISEED
00697 ELSE
00698 WRITE( NOUNIT, FMT = 9999 )'SGEESX8', IINFO, N,
00699 $ ISEED( 1 )
00700 END IF
00701 INFO = ABS( IINFO )
00702 GO TO 250
00703 END IF
00704
00705
00706
00707 IF( RCNDV1.NE.RCONDV )
00708 $ RESULT( 15 ) = ULPINV
00709
00710
00711
00712 DO 240 I = 1, N
00713 IF( WR( I ).NE.WRT( I ) .OR. WI( I ).NE.WIT( I ) )
00714 $ RESULT( 10 ) = ULPINV
00715 DO 230 J = 1, N
00716 IF( H( I, J ).NE.HT( I, J ) )
00717 $ RESULT( 11 ) = ULPINV
00718 IF( VS( I, J ).NE.VS1( I, J ) )
00719 $ RESULT( 12 ) = ULPINV
00720 230 CONTINUE
00721 240 CONTINUE
00722 IF( SDIM.NE.SDIM1 )
00723 $ RESULT( 13 ) = ULPINV
00724
00725 END IF
00726
00727 250 CONTINUE
00728
00729
00730
00731
00732 IF( COMP ) THEN
00733
00734
00735
00736
00737
00738 SELDIM = N
00739 SELOPT = 1
00740 EPS = MAX( ULP, EPSIN )
00741 DO 260 I = 1, N
00742 IPNT( I ) = I
00743 SELVAL( I ) = .FALSE.
00744 SELWR( I ) = WRTMP( I )
00745 SELWI( I ) = WITMP( I )
00746 260 CONTINUE
00747 DO 280 I = 1, N - 1
00748 KMIN = I
00749 VRMIN = WRTMP( I )
00750 VIMIN = WITMP( I )
00751 DO 270 J = I + 1, N
00752 IF( WRTMP( J ).LT.VRMIN ) THEN
00753 KMIN = J
00754 VRMIN = WRTMP( J )
00755 VIMIN = WITMP( J )
00756 END IF
00757 270 CONTINUE
00758 WRTMP( KMIN ) = WRTMP( I )
00759 WITMP( KMIN ) = WITMP( I )
00760 WRTMP( I ) = VRMIN
00761 WITMP( I ) = VIMIN
00762 ITMP = IPNT( I )
00763 IPNT( I ) = IPNT( KMIN )
00764 IPNT( KMIN ) = ITMP
00765 280 CONTINUE
00766 DO 290 I = 1, NSLCT
00767 SELVAL( IPNT( ISLCT( I ) ) ) = .TRUE.
00768 290 CONTINUE
00769
00770
00771
00772 CALL SLACPY( 'F', N, N, A, LDA, HT, LDA )
00773 CALL SGEESX( 'N', 'S', SSLECT, 'B', N, HT, LDA, SDIM1, WRT,
00774 $ WIT, VS1, LDVS, RCONDE, RCONDV, WORK, LWORK,
00775 $ IWORK, LIWORK, BWORK, IINFO )
00776 IF( IINFO.NE.0 .AND. IINFO.NE.N+2 ) THEN
00777 RESULT( 16 ) = ULPINV
00778 RESULT( 17 ) = ULPINV
00779 WRITE( NOUNIT, FMT = 9999 )'SGEESX9', IINFO, N, ISEED( 1 )
00780 INFO = ABS( IINFO )
00781 GO TO 300
00782 END IF
00783
00784
00785
00786
00787 ANORM = SLANGE( '1', N, N, A, LDA, WORK )
00788 V = MAX( REAL( N )*EPS*ANORM, SMLNUM )
00789 IF( ANORM.EQ.ZERO )
00790 $ V = ONE
00791 IF( V.GT.RCONDV ) THEN
00792 TOL = ONE
00793 ELSE
00794 TOL = V / RCONDV
00795 END IF
00796 IF( V.GT.RCDVIN ) THEN
00797 TOLIN = ONE
00798 ELSE
00799 TOLIN = V / RCDVIN
00800 END IF
00801 TOL = MAX( TOL, SMLNUM / EPS )
00802 TOLIN = MAX( TOLIN, SMLNUM / EPS )
00803 IF( EPS*( RCDEIN-TOLIN ).GT.RCONDE+TOL ) THEN
00804 RESULT( 16 ) = ULPINV
00805 ELSE IF( RCDEIN-TOLIN.GT.RCONDE+TOL ) THEN
00806 RESULT( 16 ) = ( RCDEIN-TOLIN ) / ( RCONDE+TOL )
00807 ELSE IF( RCDEIN+TOLIN.LT.EPS*( RCONDE-TOL ) ) THEN
00808 RESULT( 16 ) = ULPINV
00809 ELSE IF( RCDEIN+TOLIN.LT.RCONDE-TOL ) THEN
00810 RESULT( 16 ) = ( RCONDE-TOL ) / ( RCDEIN+TOLIN )
00811 ELSE
00812 RESULT( 16 ) = ONE
00813 END IF
00814
00815
00816
00817
00818 IF( V.GT.RCONDV*RCONDE ) THEN
00819 TOL = RCONDV
00820 ELSE
00821 TOL = V / RCONDE
00822 END IF
00823 IF( V.GT.RCDVIN*RCDEIN ) THEN
00824 TOLIN = RCDVIN
00825 ELSE
00826 TOLIN = V / RCDEIN
00827 END IF
00828 TOL = MAX( TOL, SMLNUM / EPS )
00829 TOLIN = MAX( TOLIN, SMLNUM / EPS )
00830 IF( EPS*( RCDVIN-TOLIN ).GT.RCONDV+TOL ) THEN
00831 RESULT( 17 ) = ULPINV
00832 ELSE IF( RCDVIN-TOLIN.GT.RCONDV+TOL ) THEN
00833 RESULT( 17 ) = ( RCDVIN-TOLIN ) / ( RCONDV+TOL )
00834 ELSE IF( RCDVIN+TOLIN.LT.EPS*( RCONDV-TOL ) ) THEN
00835 RESULT( 17 ) = ULPINV
00836 ELSE IF( RCDVIN+TOLIN.LT.RCONDV-TOL ) THEN
00837 RESULT( 17 ) = ( RCONDV-TOL ) / ( RCDVIN+TOLIN )
00838 ELSE
00839 RESULT( 17 ) = ONE
00840 END IF
00841
00842 300 CONTINUE
00843
00844 END IF
00845
00846 9999 FORMAT( ' SGET24: ', A, ' returned INFO=', I6, '.', / 9X, 'N=',
00847 $ I6, ', INPUT EXAMPLE NUMBER = ', I4 )
00848 9998 FORMAT( ' SGET24: ', A, ' returned INFO=', I6, '.', / 9X, 'N=',
00849 $ I6, ', JTYPE=', I6, ', ISEED=(', 3( I5, ',' ), I5, ')' )
00850
00851 RETURN
00852
00853
00854
00855 END