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

NAME

6       SLATBS - 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       band matrix
9

SYNOPSIS

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

PURPOSE

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

ARGUMENTS

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

FURTHER DETAILS

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