1DLALN2(1) LAPACK auxiliary routine (version 3.1) DLALN2(1)
2
3
4
6 DLALN2 - a system of the form (ca A - w D ) X = s B or (ca A' - w D) X
7 = s B with possible scaling ("s") and perturbation of A
8
10 SUBROUTINE DLALN2( LTRANS, NA, NW, SMIN, CA, A, LDA, D1, D2, B, LDB,
11 WR, WI, X, LDX, SCALE, XNORM, INFO )
12
13 LOGICAL LTRANS
14
15 INTEGER INFO, LDA, LDB, LDX, NA, NW
16
17 DOUBLE PRECISION CA, D1, D2, SCALE, SMIN, WI, WR, XNORM
18
19 DOUBLE PRECISION A( LDA, * ), B( LDB, * ), X( LDX, * )
20
22 DLALN2 solves a system of the form (ca A - w D ) X = s B or (ca A' - w
23 D) X = s B with possible scaling ("s") and perturbation of A. (A'
24 means A-transpose.)
25
26 A is an NA x NA real matrix, ca is a real scalar, D is an NA x NA real
27 diagonal matrix, w is a real or complex value, and X and B are NA x 1
28 matrices -- real if w is real, complex if w is complex. NA may be 1 or
29 2.
30
31 If w is complex, X and B are represented as NA x 2 matrices, the first
32 column of each being the real part and the second being the imaginary
33 part.
34
35 "s" is a scaling factor (.LE. 1), computed by DLALN2, which is so cho‐
36 sen that X can be computed without overflow. X is further scaled if
37 necessary to assure that norm(ca A - w D)*norm(X) is less than over‐
38 flow.
39
40 If both singular values of (ca A - w D) are less than SMIN, SMIN*iden‐
41 tity will be used instead of (ca A - w D). If only one singular value
42 is less than SMIN, one element of (ca A - w D) will be perturbed enough
43 to make the smallest singular value roughly SMIN. If both singular
44 values are at least SMIN, (ca A - w D) will not be perturbed. In any
45 case, the perturbation will be at most some small multiple of max(
46 SMIN, ulp*norm(ca A - w D) ). The singular values are computed by
47 infinity-norm approximations, and thus will only be correct to a factor
48 of 2 or so.
49
50 Note: all input quantities are assumed to be smaller than overflow by a
51 reasonable factor. (See BIGNUM.)
52
53
55 LTRANS (input) LOGICAL
56 =.TRUE.: A-transpose will be used.
57 =.FALSE.: A will be used (not transposed.)
58
59 NA (input) INTEGER
60 The size of the matrix A. It may (only) be 1 or 2.
61
62 NW (input) INTEGER
63 1 if "w" is real, 2 if "w" is complex. It may only be 1 or 2.
64
65 SMIN (input) DOUBLE PRECISION
66 The desired lower bound on the singular values of A. This
67 should be a safe distance away from underflow or overflow, say,
68 between (underflow/machine precision) and (machine precision *
69 overflow ). (See BIGNUM and ULP.)
70
71 CA (input) DOUBLE PRECISION
72 The coefficient c, which A is multiplied by.
73
74 A (input) DOUBLE PRECISION array, dimension (LDA,NA)
75 The NA x NA matrix A.
76
77 LDA (input) INTEGER
78 The leading dimension of A. It must be at least NA.
79
80 D1 (input) DOUBLE PRECISION
81 The 1,1 element in the diagonal matrix D.
82
83 D2 (input) DOUBLE PRECISION
84 The 2,2 element in the diagonal matrix D. Not used if NW=1.
85
86 B (input) DOUBLE PRECISION array, dimension (LDB,NW)
87 The NA x NW matrix B (right-hand side). If NW=2 ("w" is com‐
88 plex), column 1 contains the real part of B and column 2 con‐
89 tains the imaginary part.
90
91 LDB (input) INTEGER
92 The leading dimension of B. It must be at least NA.
93
94 WR (input) DOUBLE PRECISION
95 The real part of the scalar "w".
96
97 WI (input) DOUBLE PRECISION
98 The imaginary part of the scalar "w". Not used if NW=1.
99
100 X (output) DOUBLE PRECISION array, dimension (LDX,NW)
101 The NA x NW matrix X (unknowns), as computed by DLALN2. If
102 NW=2 ("w" is complex), on exit, column 1 will contain the real
103 part of X and column 2 will contain the imaginary part.
104
105 LDX (input) INTEGER
106 The leading dimension of X. It must be at least NA.
107
108 SCALE (output) DOUBLE PRECISION
109 The scale factor that B must be multiplied by to insure that
110 overflow does not occur when computing X. Thus, (ca A - w D) X
111 will be SCALE*B, not B (ignoring perturbations of A.) It will
112 be at most 1.
113
114 XNORM (output) DOUBLE PRECISION
115 The infinity-norm of X, when X is regarded as an NA x NW real
116 matrix.
117
118 INFO (output) INTEGER
119 An error flag. It will be set to zero if no error occurs, a
120 negative number if an argument is in error, or a positive num‐
121 ber if ca A - w D had to be perturbed. The possible values
122 are:
123 = 0: No error occurred, and (ca A - w D) did not have to be
124 perturbed. = 1: (ca A - w D) had to be perturbed to make its
125 smallest (or only) singular value greater than SMIN. NOTE: In
126 the interests of speed, this routine does not check the inputs
127 for errors.
128
129
130
131 LAPACK auxiliary routine (versionNo3v.e1m)ber 2006 DLALN2(1)