NRIRR
Computes the infinity norm of a real matrix.
Required Arguments
A — Real NRA by NCA matrix whose infinity norm is to be computed. (Input)
ANORM — Real scalar containing the infinity norm of A. (Output)
Optional Arguments
NRA — Number of rows of A. (Input)
Default: NRA = SIZE (A,1).
NCA — Number of columns of A. (Input)
Default: NCA = SIZE (A,2).
LDA — Leading dimension of A exactly as specified in the dimension statement of the calling program. (Input)
Default: LDA = SIZE (A,1).
FORTRAN 90 Interface
Generic: CALL NRIRR (A, ANORM [])
Specific: The specific interface names are S_NRIRR and D_NRIRR.
FORTRAN 77 Interface
Single: CALL NRIRR (NRA, NCA, A, LDA, ANORM)
Double: The double precision name is DNRIRR.
Description
The routine NRIRR computes the infinity norm of a real rectangular matrix A. If m = NRA and n = NCA, then the -norm of A is
This is the maximum of the sums of the absolute values of the row elements.
Example
Compute the infinity norm of a 3 × 4 real rectangular matrix.

USE NRIRR_INT
USE UMACH_INT

IMPLICIT NONE
! Declare variables
INTEGER NCA, NRA
PARAMETER (NCA=4, NRA=3)
!
INTEGER NOUT
REAL A(NRA,NCA), ANORM
!
! Set values for A
! A = ( 1.0 0.0 2.0 0.0 )
! ( 3.0 4.0 -1.0 0.0 )
! ( 2.0 1.0 2.0 1.0 )
!
DATA A/1.0, 3.0, 2.0, 0.0, 4.0, 1.0, 2.0, -1.0, 2.0, 0.0, 0.0, &
1.0/
! Compute the infinity norm of A
CALL NRIRR (A, ANORM)
! Print results
CALL UMACH (2, NOUT)
WRITE (NOUT,*) ' The infinity norm of A is ', ANORM
END
Output

The infinity norm of A is 8.00000