nrm2(3F)
SNRM2, DNRM2, SCNRM2, DZNRM2 - Computes the Euclidean norm of a vector
As shipped in IRIX 6.5.30. Last changed in IRIX 6.5.19.
NAME SNRM2, DNRM2, SCNRM2, DZNRM2 - Computes the Euclidean norm of a vector SYNOPSIS Real enrm = SNRM2 (n, x, incx) Double precision enrm = DNRM2 (n, xi, incx) Complex enrm = SCNRM2 (n, x, incx) Double complex enrm = DZNRM2 (n, xi, incx) DESCRIPTION SNRM2/DNRM2 computes the Euclidean (l2) norm of a real vector, as follows: enrm <- ||x||2 = n sqrt (xTx) = sqrt (Sum * xi2) i=1 where x is a real vector, and xT denotes the transpose of x. SCNRM2/DZNRM2 computes the Euclidean (l2) norm of a complex vector, as follows: enrm <- ||x||2 = n _ sqrt (xHx) = sqrt (Sum xixi) i=1 where x is a complex vector, and xH denotes the conjugate transpose of x. These functions have the following arguments: enrm Result. (output) SNRM2: Real result. DNRM2: Double precision result. SCNRM2: Real result. DZNRM2: Double precision result. Result (Euclidean norm). If n <= 0, enrm is set to 0. n Integer. (input) Number of elements in the operand vector. x Array of dimension (n-1) * |incx| + 1. (input) SNRM2: Real array. DNRM2: Double precision array. SCNRM2: Complex array. DZNRM2: Double complex array. Array x contains the operand vector. incx Integer. (input) Increment between elements of x. If incx = 0, the results will be unpredictable. NOTES These routines are Level 1 Basic Linear Algebra Subprograms (Level 1 BLAS). When working backward (incx < 0), each routine starts at the end of the vector and moves backward, as follows: x(1-incx * (n-1)), x(1-incx * (n-2)), ..., x(1)