function value = simplex_unit_monomial_integral ( m, expon )

%*****************************************************************************80
%
%% simplex_unit_monomial_integral() integrates a monomial over a simplex.
%
%  Discussion:
%
%    This routine evaluates a monomial of the form
%
%      product ( 1 <= dim <= m ) x(dim)^expon(dim)
%
%    where the exponents are nonnegative integers.  Note that
%    if the combination 0^0 is encountered, it should be treated
%    as 1.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    09 July 2007
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, the spatial dimension.
%
%    integer EXPON(M), the exponents.
%
%  Output:
%
%    real VALUE, the value of the integral of the monomial.
%

%
%  The first computation ends with VALUE = 1.0;
%
  value = 1.0;

  k = 0;

  for dim = 1 : m

    for i = 1 : expon(dim)
      k = k + 1;
      value = value * i / k;
    end

  end

  for dim = 1 : m

    k = k + 1;
    value = value / k;

  end

  return
end
