# ?latbs

Solves a triangular banded system of equations.

## Syntax

call slatbs( uplo, trans, diag, normin, n, kd, ab, ldab, x, scale, cnorm, info )

call dlatbs( uplo, trans, diag, normin, n, kd, ab, ldab, x, scale, cnorm, info )

call clatbs( uplo, trans, diag, normin, n, kd, ab, ldab, x, scale, cnorm, info )

call zlatbs( uplo, trans, diag, normin, n, kd, ab, ldab, x, scale, cnorm, info )

• mkl.fi

## Description

The routine solves one of the triangular systems

A*x = s*b, or AT*x = s*b, or AH*x = s*b (for complex flavors)

with scaling to prevent overflow, where A is an upper or lower triangular band matrix. Here AT denotes the transpose of A, AH denotes the conjugate transpose of A, x and b are n-element vectors, and s is a scaling factor, usually less than or equal to 1, chosen so that the components of x will be less than the overflow threshold. If the unscaled problem will not cause overflow, the Level 2 BLAS routine ?tbsv is called. If the matrix A is singular (A(j, j)=0 for some j), then s is set to 0 and a non-trivial solution to A*x = 0 is returned.

## Input Parameters

uplo

CHARACTER*1.

Specifies whether the matrix A is upper or lower triangular.

= 'U': upper triangular

= 'L': lower triangular

trans

CHARACTER*1.

Specifies the operation applied to A.

= 'N': solve A*x = s*b (no transpose)

= 'T': solve AT*x = s*b (transpose)

= 'C': solve AH*x = s*b (conjugate transpose)

diag

CHARACTER*1.

Specifies whether the matrix A is unit triangular

= 'N': non-unit triangular

= 'U': unit triangular

normin

CHARACTER*1.

Specifies whether cnorm is set.

= 'Y': cnorm contains the column norms on entry;

= 'N': cnorm is not set on entry. On exit, the norms is computed and stored in cnorm.

n

INTEGER. The order of the matrix A. n 0.

kd

INTEGER. The number of subdiagonals or superdiagonals in the triangular matrix A. kb 0.

ab

REAL for slatbs

DOUBLE PRECISION for dlatbs

COMPLEX for clatbs

DOUBLE COMPLEX for zlatbs.

Array, DIMENSION (ldab, n).

The upper or lower triangular band matrix A, stored in the first kb+1 rows of the array. The j-th column of A is stored in the j-th column of the array ab as follows:

if uplo = 'U', ab(kd+1+i-j,j) = A(i,j) for max(1, j-kd) ≤ ij;

if uplo = 'L', ab(1+i-j,j) = A(i,j) for ji ≤ min(n, j+kd).

ldab

INTEGER. The leading dimension of the array ab. ldabkb+1.

x

REAL for slatbs

DOUBLE PRECISION for dlatbs

COMPLEX for clatbs

DOUBLE COMPLEX for zlatbs.

Array, DIMENSION (n).

On entry, the right hand side b of the triangular system.

cnorm

REAL for slatbs/clatbs

DOUBLE PRECISION for dlatbs/zlatbs.

Array, DIMENSION (n).

If NORMIN = 'Y', cnorm is an input argument and cnorm(j) contains the norm of the off-diagonal part of the j-th column of A.

If trans = 'N', cnorm(j) must be greater than or equal to the infinity-norm, and if trans = 'T' or 'C', cnorm(j) must be greater than or equal to the 1-norm.

## Output Parameters

scale

REAL for slatbs/clatbs

DOUBLE PRECISION for dlatbs/zlatbs.

The scaling factor s for the triangular system as described above. If scale = 0, the matrix A is singular or badly scaled, and the vector x is an exact or approximate solution to Ax = 0.

cnorm

If normin = 'N', cnorm is an output argument and cnorm(j) returns the 1-norm of the off-diagonal part of the j-th column of A.

info

INTEGER.

= 0: successful exit

< 0: if info = -k, the k-th argument had an illegal value

For more complete information about compiler optimizations, see our Optimization Notice.