function value = hunecke_f ( m, n, x )

%*****************************************************************************80
%
%% HUNECKE_F returns the function in the hunecke problem.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    06 December 2016
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Sashwati Ray, PSV Nataraj,
%    An efficient algorithm for range computation of polynomials using the
%    Bernstein form,
%    Journal of Global Optimization,
%    Volume 45, 2009, pages 403-426.
%
%  Parameters:
%
%    Input, integer M, the number of variables.
%
%    Input, integer N, the number of points.
%
%    Input, real X(M,N), the points.
%
%    Output, real VALUE(N), the value of the function at X.
%
  value(1:n) = ( ...
    +           x(2,1:n) .^ 6  .* x(3,1:n)                                                   ...
    +           x(2,1:n)       .* x(3,1:n) .^ 6                                              ...
    +           x(1,1:n) .^ 2  .* x(2,1:n) .^ 4 .* x(5,1:n)                                  ...
    - 3.0E+00 * x(1,1:n)       .* x(2,1:n) .^ 2 .* x(3,1:n) .^2 .* x(4,1:n)      .* x(5,1:n) ...
    +           x(3,1:n) .^ 4  .* x(4,1:n) .^ 2 .* x(5,1:n)                                  ...
    -           x(1,1:n) .^ 3  .* x(3,1:n)      .* x(4,1:n)     .* x(5,1:n) .^ 2             ...
    -           x(1,1:n)       .* x(2,1:n)      .* x(4,1:n) .^3 .* x(5,1:n) .^ 2             ...
    +           x(2,1:n)       .* x(3,1:n)      .* x(5,1:n) .^5 )';

  return
end


