?nrm2

Computes the Euclidean norm of a vector.

Syntax

FORTRAN 77:

res = snrm2(n, x, incx)

res = dnrm2(n, x, incx)

res = scnrm2(n, x, incx)

res = dznrm2(n, x, incx)

Fortran 95:

res = nrm2(x)

Include Files

The FORTRAN 77 interfaces are specified in the mkl_blas.fi include file, the Fortran 95 interfaces are specified in the blas.f90 include file, and the C interfaces are specified in the mkl_blas.h include file.

Description

The ?nrm2 routines perform a vector reduction operation defined as
res = ||x||,

where:

x is a vector,

res is a value containing the Euclidean norm of the elements of x.

Input Parameters

n

INTEGER. Specifies the number of elements in vector x.

x

REAL for snrm2

DOUBLE PRECISION for dnrm2

COMPLEX for scnrm2

DOUBLE COMPLEX for dznrm2

Array, DIMENSION at least (1 + (n -1)*abs (incx)).

incx

INTEGER. Specifies the increment for the elements of x.

Output Parameters

res

REAL for snrm2

DOUBLE PRECISION for dnrm2

REAL for scnrm2

DOUBLE PRECISION for dznrm2

Contains the Euclidean norm of the vector x.

Fortran 95 Interface Notes

Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or reconstructible arguments, see Fortran 95 Interface Conventions.

Specific details for the routine nrm2 interface are the following:

x

Holds the vector with the number of elements n.


Submit feedback on this help topic

Copyright © 1994 - 2011, Intel Corporation. All rights reserved.