function value = quadratic_f ( m, n, x )

%*****************************************************************************80
%
%% QUADRATIC_F returns the function in the quadratic problem.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    08 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.
%
  r = - 2.0;

  value = - r * ones ( 1, n );

  for i = 1 : m
    value = value + x(i,1:n) .^2;
  end

  value = value';

  return
end


