NAG Library Routine Document

f16rbf (dgb_norm)


    1  Purpose
    7  Accuracy


f16rbf calculates the value of the 1-norm, the -norm, the Frobenius norm or the maximum absolute value of the elements of a real m by n band matrix stored in banded form.
It can also be used to compute the value of the 2-norm of a row n-vector or a column m-vector.


Fortran Interface
Function f16rbf ( inorm, m, n, kl, ku, ab, ldab)
Real (Kind=nag_wp):: f16rbf
Integer, Intent (In):: inorm, m, n, kl, ku, ldab
Real (Kind=nag_wp), Intent (In):: ab(ldab,*)
C Header Interface
#include nagmk26.h
double  f16rbf_ (const Integer *inorm, const Integer *m, const Integer *n, const Integer *kl, const Integer *ku, const double ab[], const Integer *ldab)


Given a real m by n banded matrix, A, f16rbf calculates one of the values given by
A1=maxji=1maij (the 1-norm of A),
A=maxij= 1naij (the -norm of A),
AF=i=1mj=1naij21/2 (the Frobenius norm of A),   or
maxi,jaij (the maximum absolute element value of A).
If m or n is 1 then additionally f16rbf can calculate the value A2=ai2 (the 2-norm of A).


Basic Linear Algebra Subprograms Technical (BLAST) Forum (2001) Basic Linear Algebra Subprograms Technical (BLAST) Forum Standard University of Tennessee, Knoxville, Tennessee


1:     inorm – IntegerInput
On entry: specifies the value to be returned. The integer codes shown below can be replaced by the equivalent named constants of the form NAG_?_NORM. These named constants are available via the nag_library module and are also used in the example program for clarity.
inorm=171 (NAG_ONE_NORM)
The 1-norm.
inorm=173 (NAG_TWO_NORM)
The 2-norm of a row or column vector.
The Frobenius (or Euclidean) norm.
inorm=175 (NAG_INF_NORM)
The -norm.
inorm=177 (NAG_MAX_NORM)
The value maxi,jaij (not a norm).
  • inorm=171, 173, 174, 175 or 177;
  • if inorm=173, m=1 or n=1.
2:     m – IntegerInput
On entry: m, the number of rows of the matrix A. If m0 on input, f16rbf returns 0.
3:     n – IntegerInput
On entry: n, the number of columns of the matrix A. If n0 on input, f16rbf returns 0.
4:     kl – IntegerInput
On entry: kl, the number of subdiagonals within the band of A. If kl0 on input, f16rbf returns 0.
5:     ku – IntegerInput
On entry: ku, the number of superdiagonals within the band of A. If ku0 on input, f16rbf returns 0.
6:     abldab* – Real (Kind=nag_wp) arrayInput
Note: the second dimension of the array ab must be at least max1,n.
On entry: the m by n band matrix A.
The matrix is stored in rows 1 to kl+ku+1, more precisely, the element Aij must be stored in
abku+1+i-jj  for ​max1,j-kuiminm,j+kl. 
7:     ldab – IntegerInput
On entry: the first dimension of the array ab as declared in the (sub)program from which f16rbf is called.
Constraint: ldabkl+ku+1.

Error Indicators and Warnings

If any constraint on an input parameter is violated, an error message is printed and program execution is terminated.


The BLAS standard requires accurate implementations which avoid unnecessary over/underflow (see Section 2.7 of Basic Linear Algebra Subprograms Technical (BLAST) Forum (2001)).

Parallelism and Performance

f16rbf is not threaded in any implementation.

Further Comments



Calculates the various norms of a 6 by 4 banded matrix with two subdiagonals and one superdiagonal.

Program Text

Program Text (f16rbfe.f90)

Program Data

Program Data (f16rbfe.d)

Program Results

Program Results (f16rbfe.r)

© The Numerical Algorithms Group Ltd, Oxford, UK. 2017