naginterfaces.library.linsys.real_band_solve(n, kl, ku, ab, b)[source]

real_band_solve computes the solution to a real system of linear equations , where is an band matrix, with subdiagonals and superdiagonals, and and are matrices. An estimate of the condition number of and an error bound for the computed solution are also returned.

For full information please refer to the NAG Library document for f04bb


The number of linear equations , i.e., the order of the matrix .


The number of subdiagonals , within the band of .


The number of superdiagonals , within the band of .

abfloat, array-like, shape

The matrix .

See Further Comments for further details.

bfloat, array-like, shape

The matrix of right-hand sides .

abfloat, ndarray, shape

If no exception is raised, is overwritten by details of the factorization.

ipivint, ndarray, shape

If no exception is raised, the pivot indices that define the permutation matrix ; at the th step row of the matrix was interchanged with row . indicates a row interchange was not required.

bfloat, ndarray, shape

If the function exits successfully or = + 1, the solution matrix .


If no constraints are violated, an estimate of the reciprocal of the condition number of the matrix , computed as .


If the function exits successfully or = + 1, an estimate of the forward error bound for a computed solution , such that , where is a column of the computed solution returned in the array and is the corresponding column of the exact solution . If is less than machine precision, is returned as unity.

(errno )

On entry, , and .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

Diagonal element of the upper triangular factor is zero. The factorization has been completed, but the solution could not be computed.

(errno )

A solution has been computed, but is less than machine precision so that the matrix is numerically singular.


The decomposition with partial pivoting and row interchanges is used to factor as , where is a permutation matrix, is the product of permutation matrices and unit lower triangular matrices with subdiagonals, and is upper triangular with superdiagonals. The factored form of is then used to solve the system of equations .


Anderson, E, Bai, Z, Bischof, C, Blackford, S, Demmel, J, Dongarra, J J, Du Croz, J J, Greenbaum, A, Hammarling, S, McKenney, A and Sorensen, D, 1999, LAPACK Users’ Guide, (3rd Edition), SIAM, Philadelphia,

Higham, N J, 2002, Accuracy and Stability of Numerical Algorithms, (2nd Edition), SIAM, Philadelphia