1SLATPS(1)           LAPACK auxiliary routine (version 3.1)           SLATPS(1)
2
3
4

NAME

6       SLATPS - one of the triangular systems   A *x = s*b or A'*x = s*b  with
7       scaling to prevent overflow, where A is an upper  or  lower  triangular
8       matrix stored in packed form
9

SYNOPSIS

11       SUBROUTINE SLATPS( UPLO,  TRANS,  DIAG, NORMIN, N, AP, X, SCALE, CNORM,
12                          INFO )
13
14           CHARACTER      DIAG, NORMIN, TRANS, UPLO
15
16           INTEGER        INFO, N
17
18           REAL           SCALE
19
20           REAL           AP( * ), CNORM( * ), X( * )
21

PURPOSE

23       SLATPS solves one of the triangular systems transpose of A, x and b are
24       n-element  vectors,  and  s  is  a scaling factor, usually less than or
25       equal to 1, chosen so that the components of x will be  less  than  the
26       overflow  threshold.   If the unscaled problem will not cause overflow,
27       the Level 2 BLAS routine STPSV is called. If the matrix A  is  singular
28       (A(j,j)  = 0 for some j), then s is set to 0 and a non-trivial solution
29       to A*x = 0 is returned.
30
31

ARGUMENTS

33       UPLO    (input) CHARACTER*1
34               Specifies whether the matrix A is upper or lower triangular.  =
35               'U':  Upper triangular
36               = 'L':  Lower triangular
37
38       TRANS   (input) CHARACTER*1
39               Specifies  the  operation  applied to A.  = 'N':  Solve A * x =
40               s*b  (No transpose)
41               = 'T':  Solve A'* x = s*b  (Transpose)
42               = 'C':  Solve A'* x = s*b  (Conjugate transpose = Transpose)
43
44       DIAG    (input) CHARACTER*1
45               Specifies whether or not the matrix A is  unit  triangular.   =
46               'N':  Non-unit triangular
47               = 'U':  Unit triangular
48
49       NORMIN  (input) CHARACTER*1
50               Specifies  whether  CNORM  has  been set or not.  = 'Y':  CNORM
51               contains the column norms on entry
52               = 'N':  CNORM is not set on entry.  On exit, the norms will  be
53               computed and stored in CNORM.
54
55       N       (input) INTEGER
56               The order of the matrix A.  N >= 0.
57
58       AP      (input) REAL array, dimension (N*(N+1)/2)
59               The  upper or lower triangular matrix A, packed columnwise in a
60               linear array.  The j-th column of A is stored in the  array  AP
61               as  follows:  if  UPLO  =  'U',  AP(i + (j-1)*j/2) = A(i,j) for
62               1<=i<=j; if UPLO = 'L', AP(i +  (j-1)*(2n-j)/2)  =  A(i,j)  for
63               j<=i<=n.
64
65       X       (input/output) REAL array, dimension (N)
66               On  entry,  the right hand side b of the triangular system.  On
67               exit, X is overwritten by the solution vector x.
68
69       SCALE   (output) REAL
70               The scaling factor s for the triangular system A * x = s*b   or
71               A'*  x  = s*b.  If SCALE = 0, the matrix A is singular or badly
72               scaled, and the vector x is an exact or approximate solution to
73               A*x = 0.
74
75       CNORM   (input or output) REAL array, dimension (N)
76
77               If  NORMIN  = 'Y', CNORM is an input argument and CNORM(j) con‐
78               tains the norm of the off-diagonal part of the j-th  column  of
79               A.   If  TRANS = 'N', CNORM(j) must be greater than or equal to
80               the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j) must  be
81               greater than or equal to the 1-norm.
82
83               If  NORMIN  =  'N',  CNORM  is  an output argument and CNORM(j)
84               returns the 1-norm of the offdiagonal part of the  j-th  column
85               of A.
86
87       INFO    (output) INTEGER
88               = 0:  successful exit
89               < 0:  if INFO = -k, the k-th argument had an illegal value
90

FURTHER DETAILS

92       A rough bound on x is computed; if that is less than overflow, STPSV is
93       called, otherwise, specific code is  used  which  checks  for  possible
94       overflow or divide-by-zero at every operation.
95
96       A  columnwise  scheme is used for solving A*x = b.  The basic algorithm
97       if A is lower triangular is
98
99            x[1:n] := b[1:n]
100            for j = 1, ..., n
101                 x(j) := x(j) / A(j,j)
102                 x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
103            end
104
105       Define bounds on the components of x after j iterations of the loop:
106          M(j) = bound on x[1:j]
107          G(j) = bound on x[j+1:n]
108       Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
109
110       Then for iteration j+1 we have
111          M(j+1) <= G(j) / | A(j+1,j+1) |
112          G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
113                 <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
114
115       where CNORM(j+1) is greater than or equal to the infinity-norm of  col‐
116       umn j+1 of A, not counting the diagonal.  Hence
117
118          G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
119                       1<=i<=j
120       and
121
122          |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
123                                        1<=i< j
124
125       Since  |x(j)|  <=  M(j),  we  use the Level 2 BLAS routine STPSV if the
126       reciprocal of the largest M(j), j=1,..,n, is larger than
127       max(underflow, 1/overflow).
128
129       The bound on x(j) is also used to determine when a step in the  column‐
130       wise method can be performed without fear of overflow.  If the computed
131       bound is greater than a large constant, x is scaled  to  prevent  over‐
132       flow,  but  if the bound overflows, x is set to 0, x(j) to 1, and scale
133       to 0, and a non-trivial solution to A*x = 0 is found.
134
135       Similarly, a row-wise scheme is used to solve  A'*x  =  b.   The  basic
136       algorithm for A upper triangular is
137
138            for j = 1, ..., n
139                 x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
140            end
141
142       We simultaneously compute two bounds
143            G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
144            M(j) = bound on x(i), 1<=i<=j
145
146       The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we add
147       the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.  Then  the
148       bound on x(j) is
149
150            M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
151
152                 <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
153                           1<=i<=j
154
155       and we can safely call STPSV if 1/M(n) and 1/G(n) are both greater than
156       max(underflow, 1/overflow).
157
158
159
160
161 LAPACK auxiliary routine (versionNo3v.e1m)ber 2006                       SLATPS(1)
Impressum