function value = rms ( x )

%*****************************************************************************80
%
%% rms() returns the RMS norm of an R8VEC.
%
%  Discussion:
%
%    The vector RMS norm is defined as:
%
%      value = sqrt ( sum ( 1 <= I <= N ) |A(I)|^2 / N ).
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    09 March 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real X(N), the vector.
%
%  Output:
%
%    real VALUE, the RMS norm.
%
  n = length ( x );

  value = sqrt ...
  ( ...
    sum ...
    ( ...
      ( abs ( x ) ).^2 ...
    ) / n ...
  );

  return
end
