nrm2(3F)

SNRM2, DNRM2, SCNRM2, DZNRM2 - Computes the Euclidean norm of a vector

As shipped in IRIX 6.5.15. Last changed in IRIX 6.5.5.

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)

IMPLEMENTATION
     IRIX systems

DESCRIPTION
     SNRM2/DNRM2 computes the Euclidean (l ) norm of a real vector, as
     follows:                             2

          enrm <- ||x||  =
                       2
                 T            n      2
          sqrt (x x) = sqrt (Sum * x  )
                             i=1    i

                                    T
     where x is a real vector, and x  denotes the transpose of x.

     SCNRM2/DZNRM2 computes the Euclidean (l ) norm of a complex vector, as
     follows:                               2

          enrm <- ||x||  =
                       2
                 H            n  _
          sqrt (x x) = sqrt (Sum x x )
                             i=1  i i
                                       H
     where x is a complex vector, and x  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)

SEE ALSO
     This man page is available only online.