File: dlaln2

package info (click to toggle)
ruby-lapack 1.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 28,552 kB
  • sloc: ansic: 191,612; ruby: 3,934; makefile: 8
file content (187 lines) | stat: -rwxr-xr-x 6,483 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
--- 
:name: dlaln2
:md5sum: 029cdd6fe89ae0077f078ad1c1d1da86
:category: :subroutine
:arguments: 
- ltrans: 
    :type: logical
    :intent: input
- na: 
    :type: integer
    :intent: input
- nw: 
    :type: integer
    :intent: input
- smin: 
    :type: doublereal
    :intent: input
- ca: 
    :type: doublereal
    :intent: input
- a: 
    :type: doublereal
    :intent: input
    :dims: 
    - lda
    - na
- lda: 
    :type: integer
    :intent: input
- d1: 
    :type: doublereal
    :intent: input
- d2: 
    :type: doublereal
    :intent: input
- b: 
    :type: doublereal
    :intent: input
    :dims: 
    - ldb
    - nw
- ldb: 
    :type: integer
    :intent: input
- wr: 
    :type: doublereal
    :intent: input
- wi: 
    :type: doublereal
    :intent: input
- x: 
    :type: doublereal
    :intent: output
    :dims: 
    - ldx
    - nw
- ldx: 
    :type: integer
    :intent: input
- scale: 
    :type: doublereal
    :intent: output
- xnorm: 
    :type: doublereal
    :intent: output
- info: 
    :type: integer
    :intent: output
:substitutions: 
  ldx: na
:fortran_help: "      SUBROUTINE DLALN2( LTRANS, NA, NW, SMIN, CA, A, LDA, D1, D2, B, LDB, WR, WI, X, LDX, SCALE, XNORM, INFO )\n\n\
  *  Purpose\n\
  *  =======\n\
  *\n\
  *  DLALN2 solves a system of the form  (ca A - w D ) X = s B\n\
  *  or (ca A' - w D) X = s B   with possible scaling (\"s\") and\n\
  *  perturbation of A.  (A' means A-transpose.)\n\
  *\n\
  *  A is an NA x NA real matrix, ca is a real scalar, D is an NA x NA\n\
  *  real diagonal matrix, w is a real or complex value, and X and B are\n\
  *  NA x 1 matrices -- real if w is real, complex if w is complex.  NA\n\
  *  may be 1 or 2.\n\
  *\n\
  *  If w is complex, X and B are represented as NA x 2 matrices,\n\
  *  the first column of each being the real part and the second\n\
  *  being the imaginary part.\n\
  *\n\
  *  \"s\" is a scaling factor (.LE. 1), computed by DLALN2, which is\n\
  *  so chosen that X can be computed without overflow.  X is further\n\
  *  scaled if necessary to assure that norm(ca A - w D)*norm(X) is less\n\
  *  than overflow.\n\
  *\n\
  *  If both singular values of (ca A - w D) are less than SMIN,\n\
  *  SMIN*identity will be used instead of (ca A - w D).  If only one\n\
  *  singular value is less than SMIN, one element of (ca A - w D) will be\n\
  *  perturbed enough to make the smallest singular value roughly SMIN.\n\
  *  If both singular values are at least SMIN, (ca A - w D) will not be\n\
  *  perturbed.  In any case, the perturbation will be at most some small\n\
  *  multiple of max( SMIN, ulp*norm(ca A - w D) ).  The singular values\n\
  *  are computed by infinity-norm approximations, and thus will only be\n\
  *  correct to a factor of 2 or so.\n\
  *\n\
  *  Note: all input quantities are assumed to be smaller than overflow\n\
  *  by a reasonable factor.  (See BIGNUM.)\n\
  *\n\n\
  *  Arguments\n\
  *  ==========\n\
  *\n\
  *  LTRANS  (input) LOGICAL\n\
  *          =.TRUE.:  A-transpose will be used.\n\
  *          =.FALSE.: A will be used (not transposed.)\n\
  *\n\
  *  NA      (input) INTEGER\n\
  *          The size of the matrix A.  It may (only) be 1 or 2.\n\
  *\n\
  *  NW      (input) INTEGER\n\
  *          1 if \"w\" is real, 2 if \"w\" is complex.  It may only be 1\n\
  *          or 2.\n\
  *\n\
  *  SMIN    (input) DOUBLE PRECISION\n\
  *          The desired lower bound on the singular values of A.  This\n\
  *          should be a safe distance away from underflow or overflow,\n\
  *          say, between (underflow/machine precision) and  (machine\n\
  *          precision * overflow ).  (See BIGNUM and ULP.)\n\
  *\n\
  *  CA      (input) DOUBLE PRECISION\n\
  *          The coefficient c, which A is multiplied by.\n\
  *\n\
  *  A       (input) DOUBLE PRECISION array, dimension (LDA,NA)\n\
  *          The NA x NA matrix A.\n\
  *\n\
  *  LDA     (input) INTEGER\n\
  *          The leading dimension of A.  It must be at least NA.\n\
  *\n\
  *  D1      (input) DOUBLE PRECISION\n\
  *          The 1,1 element in the diagonal matrix D.\n\
  *\n\
  *  D2      (input) DOUBLE PRECISION\n\
  *          The 2,2 element in the diagonal matrix D.  Not used if NW=1.\n\
  *\n\
  *  B       (input) DOUBLE PRECISION array, dimension (LDB,NW)\n\
  *          The NA x NW matrix B (right-hand side).  If NW=2 (\"w\" is\n\
  *          complex), column 1 contains the real part of B and column 2\n\
  *          contains the imaginary part.\n\
  *\n\
  *  LDB     (input) INTEGER\n\
  *          The leading dimension of B.  It must be at least NA.\n\
  *\n\
  *  WR      (input) DOUBLE PRECISION\n\
  *          The real part of the scalar \"w\".\n\
  *\n\
  *  WI      (input) DOUBLE PRECISION\n\
  *          The imaginary part of the scalar \"w\".  Not used if NW=1.\n\
  *\n\
  *  X       (output) DOUBLE PRECISION array, dimension (LDX,NW)\n\
  *          The NA x NW matrix X (unknowns), as computed by DLALN2.\n\
  *          If NW=2 (\"w\" is complex), on exit, column 1 will contain\n\
  *          the real part of X and column 2 will contain the imaginary\n\
  *          part.\n\
  *\n\
  *  LDX     (input) INTEGER\n\
  *          The leading dimension of X.  It must be at least NA.\n\
  *\n\
  *  SCALE   (output) DOUBLE PRECISION\n\
  *          The scale factor that B must be multiplied by to insure\n\
  *          that overflow does not occur when computing X.  Thus,\n\
  *          (ca A - w D) X  will be SCALE*B, not B (ignoring\n\
  *          perturbations of A.)  It will be at most 1.\n\
  *\n\
  *  XNORM   (output) DOUBLE PRECISION\n\
  *          The infinity-norm of X, when X is regarded as an NA x NW\n\
  *          real matrix.\n\
  *\n\
  *  INFO    (output) INTEGER\n\
  *          An error flag.  It will be set to zero if no error occurs,\n\
  *          a negative number if an argument is in error, or a positive\n\
  *          number if  ca A - w D  had to be perturbed.\n\
  *          The possible values are:\n\
  *          = 0: No error occurred, and (ca A - w D) did not have to be\n\
  *                 perturbed.\n\
  *          = 1: (ca A - w D) had to be perturbed to make its smallest\n\
  *               (or only) singular value greater than SMIN.\n\
  *          NOTE: In the interests of speed, this routine does not\n\
  *                check the inputs for errors.\n\
  *\n\n\
  * =====================================================================\n\
  *\n"