1SLAE2(1) LAPACK auxiliary routine (version 3.1) SLAE2(1)
2
3
4
6 SLAE2 - the eigenvalues of a 2-by-2 symmetric matrix [ A B ] [ B C ]
7
9 SUBROUTINE SLAE2( A, B, C, RT1, RT2 )
10
11 REAL A, B, C, RT1, RT2
12
14 SLAE2 computes the eigenvalues of a 2-by-2 symmetric matrix
15 [ A B ]
16 [ B C ]. On return, RT1 is the eigenvalue of larger absolute
17 value, and RT2 is the eigenvalue of smaller absolute value.
18
19
21 A (input) REAL
22 The (1,1) element of the 2-by-2 matrix.
23
24 B (input) REAL
25 The (1,2) and (2,1) elements of the 2-by-2 matrix.
26
27 C (input) REAL
28 The (2,2) element of the 2-by-2 matrix.
29
30 RT1 (output) REAL
31 The eigenvalue of larger absolute value.
32
33 RT2 (output) REAL
34 The eigenvalue of smaller absolute value.
35
37 RT1 is accurate to a few ulps barring over/underflow.
38
39 RT2 may be inaccurate if there is massive cancellation in the determi‐
40 nant A*C-B*B; higher precision or correctly rounded or correctly trun‐
41 cated arithmetic would be needed to compute RT2 accurately in all
42 cases.
43
44 Overflow is possible only if RT1 is within a factor of 5 of overflow.
45 Underflow is harmless if the input data is 0 or exceeds
46 underflow_threshold / macheps.
47
48
49
50
51 LAPACK auxiliary routine (versionNo3v.e1m)ber 2006 SLAE2(1)