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