function mean = r8vec_mean_geometric ( n, x )

%*****************************************************************************80
%
%% R8VEC_MEAN_GEOMETRIC returns the geometric mean of an R8VEC.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 December 2017
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of entries in the vector.
%
%    real X(N), the vector whose mean is desired.
%    All entries should be nonnegative.
%
%  Output:
%
%    real MEAN, the geometric mean of the vector entries.
%
  mean = exp ( sum ( log ( x(1:n) ) ) / n );

  return
end
