1SLASV2(1) LAPACK auxiliary routine (version 3.1) SLASV2(1)
2
3
4
6 SLASV2 - the singular value decomposition of a 2-by-2 triangular matrix
7 [ F G ] [ 0 H ]
8
10 SUBROUTINE SLASV2( F, G, H, SSMIN, SSMAX, SNR, CSR, SNL, CSL )
11
12 REAL CSL, CSR, F, G, H, SNL, SNR, SSMAX, SSMIN
13
15 SLASV2 computes the singular value decomposition of a 2-by-2 triangular
16 matrix
17 [ F G ]
18 [ 0 H ]. On return, abs(SSMAX) is the larger singular value,
19 abs(SSMIN) is the smaller singular value, and (CSL,SNL) and (CSR,SNR)
20 are the left and right singular vectors for abs(SSMAX), giving the
21 decomposition
22
23 [ CSL SNL ] [ F G ] [ CSR -SNR ] = [ SSMAX 0 ]
24 [-SNL CSL ] [ 0 H ] [ SNR CSR ] [ 0 SSMIN ].
25
26
28 F (input) REAL
29 The (1,1) element of the 2-by-2 matrix.
30
31 G (input) REAL
32 The (1,2) element of the 2-by-2 matrix.
33
34 H (input) REAL
35 The (2,2) element of the 2-by-2 matrix.
36
37 SSMIN (output) REAL
38 abs(SSMIN) is the smaller singular value.
39
40 SSMAX (output) REAL
41 abs(SSMAX) is the larger singular value.
42
43 SNL (output) REAL
44 CSL (output) REAL The vector (CSL, SNL) is a unit left sin‐
45 gular vector for the singular value abs(SSMAX).
46
47 SNR (output) REAL
48 CSR (output) REAL The vector (CSR, SNR) is a unit right
49 singular vector for the singular value abs(SSMAX).
50
52 Any input parameter may be aliased with any output parameter.
53
54 Barring over/underflow and assuming a guard digit in subtraction, all
55 output quantities are correct to within a few units in the last place
56 (ulps).
57
58 In IEEE arithmetic, the code works correctly if one matrix element is
59 infinite.
60
61 Overflow will not occur unless the largest singular value itself over‐
62 flows or is within a few ulps of overflow. (On machines with partial
63 overflow, like the Cray, overflow may occur if the largest singular
64 value is within a factor of 2 of overflow.)
65
66 Underflow is harmless if underflow is gradual. Otherwise, results may
67 correspond to a matrix modified by perturbations of size near the
68 underflow threshold.
69
70
71
72
73 LAPACK auxiliary routine (versionNo3v.e1m)ber 2006 SLASV2(1)