
Chapter 2 Basic Vector Operations 109
Euclidean norm SNRM2/DNRM2/SCNRM2/DZNRM2
Example Compute the Euclidean norm of the REAL*8 vector x, where x is a vector 10
elements long stored in a one-dimensional array X of dimension 20.
INTEGER*4 N,INCX
REAL*8 S,DNRM2,X(20)
N = 10
INCX = 1
S = DNRM2 (N,X,INCX)