Norm of a vectorF_SNORM/F_DNORM

Name

F_SNORM/F_DNORM

 

Norm of a vector

Purpose

F_xNORM computes one of the following for a vector x depending on the value

 

passed as the norm operator argument:

 

1-norm

 

Real 1-norm

 

2-norm

 

Frobenius-norm

 

Max-norm

 

Real-max-norm

 

Infinity-norm

 

Real infinity-norm

 

 

r

 

 

 

x

 

 

 

1,

 

 

 

x

 

 

 

1 R,

 

 

 

x

 

 

 

2,

 

 

 

x

 

 

 

, or

 

 

 

x

 

 

 

R

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Refer to NORM parameter below for details. If n is less than or equal to zero,

 

this routine returns immediately with the output scalar r set to zero. The

 

resulting scalar r is always real.

Usage

VECLIB:

INTEGER*4

INCX, N, NORM

REAL*4

X( * )

REAL*4

FUNCTION F_SNORM (NORM, N, X, INCX)

INTEGER*4

INCX, N, NORM

REAL*8

X( * )

REAL*4

FUNCTION F_SNORM (NORM, N, X, INCX)

VECLIB8:

 

INTEGER*8

INCX, N, NORM

REAL*4

X( * )

REAL*4

FUNCTION F_SNORM (NORM, N, X, INCX)

INTEGER*8

INCX, N, NORM

REAL*8

X( * )

REAL*4

FUNCTION F_SNORM (NORM, N, X, INCX)

Chapter 2 Basic Vector Operations 185