NORM2 intrinsic function
Standard: F77 F90 F95 F2003 F2008
  Example Program
NORM2 ( X [ , DIM ] )

X : rank N array of type Real;
DIM : scalar Integer in the range 1 to N;

Result: Same type and type parameters as X.

Returns the L2 norm of X. If DIM is absent, the result is scalar. If DIM is present, it reduces the array in that dimension with the NORM2 operation; the result has the shape of X with dimension DIM omitted.

If no elements are selected for a set of NORM2 operations, the result is zero.

The L2 norm is the square root of the sum of the squares of the elements, computed without undue overflow or underflow. Note that if X is a 2-element vector, this is essentially the same as HYPOT(X(1),X(2)).

HYPOT intrinsic function, Reduction intrinsic functions