1SLAG2(1) LAPACK auxiliary routine (version 3.1) SLAG2(1)
2
3
4
6 SLAG2 - the eigenvalues of a 2 x 2 generalized eigenvalue problem A - w
7 B, with scaling as necessary to avoid over-/underflow
8
10 SUBROUTINE SLAG2( A, LDA, B, LDB, SAFMIN, SCALE1, SCALE2, WR1, WR2, WI
11 )
12
13 INTEGER LDA, LDB
14
15 REAL SAFMIN, SCALE1, SCALE2, WI, WR1, WR2
16
17 REAL A( LDA, * ), B( LDB, * )
18
20 SLAG2 computes the eigenvalues of a 2 x 2 generalized eigenvalue prob‐
21 lem A - w B, with scaling as necessary to avoid over-/underflow.
22
23 The scaling factor "s" results in a modified eigenvalue equation
24
25 s A - w B
26
27 where s is a non-negative scaling factor chosen so that w, w B, and
28 s A do not overflow and, if possible, do not underflow, either.
29
30
32 A (input) REAL array, dimension (LDA, 2)
33 On entry, the 2 x 2 matrix A. It is assumed that its 1-norm is
34 less than 1/SAFMIN. Entries less than sqrt(SAFMIN)*norm(A) are
35 subject to being treated as zero.
36
37 LDA (input) INTEGER
38 The leading dimension of the array A. LDA >= 2.
39
40 B (input) REAL array, dimension (LDB, 2)
41 On entry, the 2 x 2 upper triangular matrix B. It is assumed
42 that the one-norm of B is less than 1/SAFMIN. The diagonals
43 should be at least sqrt(SAFMIN) times the largest element of B
44 (in absolute value); if a diagonal is smaller than that, then
45 +/- sqrt(SAFMIN) will be used instead of that diagonal.
46
47 LDB (input) INTEGER
48 The leading dimension of the array B. LDB >= 2.
49
50 SAFMIN (input) REAL
51 The smallest positive number s.t. 1/SAFMIN does not overflow.
52 (This should always be SLAMCH('S') -- it is an argument in
53 order to avoid having to call SLAMCH frequently.)
54
55 SCALE1 (output) REAL
56 A scaling factor used to avoid over-/underflow in the eigenval‐
57 ue equation which defines the first eigenvalue. If the eigen‐
58 values are complex, then the eigenvalues are ( WR1 +/- WI i )
59 / SCALE1 (which may lie outside the exponent range of the
60 machine), SCALE1=SCALE2, and SCALE1 will always be positive.
61 If the eigenvalues are real, then the first (real) eigenvalue
62 is WR1 / SCALE1 , but this may overflow or underflow, and in
63 fact, SCALE1 may be zero or less than the underflow threshhold
64 if the exact eigenvalue is sufficiently large.
65
66 SCALE2 (output) REAL
67 A scaling factor used to avoid over-/underflow in the eigenval‐
68 ue equation which defines the second eigenvalue. If the eigen‐
69 values are complex, then SCALE2=SCALE1. If the eigenvalues are
70 real, then the second (real) eigenvalue is WR2 / SCALE2 , but
71 this may overflow or underflow, and in fact, SCALE2 may be zero
72 or less than the underflow threshhold if the exact eigenvalue
73 is sufficiently large.
74
75 WR1 (output) REAL
76 If the eigenvalue is real, then WR1 is SCALE1 times the eigen‐
77 value closest to the (2,2) element of A B**(-1). If the eigen‐
78 value is complex, then WR1=WR2 is SCALE1 times the real part of
79 the eigenvalues.
80
81 WR2 (output) REAL
82 If the eigenvalue is real, then WR2 is SCALE2 times the other
83 eigenvalue. If the eigenvalue is complex, then WR1=WR2 is
84 SCALE1 times the real part of the eigenvalues.
85
86 WI (output) REAL
87 If the eigenvalue is real, then WI is zero. If the eigenvalue
88 is complex, then WI is SCALE1 times the imaginary part of the
89 eigenvalues. WI will always be non-negative.
90
91
92
93 LAPACK auxiliary routine (versionNo3v.e1m)ber 2006 SLAG2(1)