function f = p06_f ( m, n, x )

%*****************************************************************************80
%
%% p06_f() evaluates the M nonlinear functions for problem 6.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 March 2026
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Jorge More, Burton Garbow, and Kenneth Hillstrom,
%    Testing unconstrained optimization software,
%    ACM Transactions on Mathematical Software,
%    Volume 7, pages 17-41, 1981.
%
%  Input:
%
%    integer M, the number of functions.
%
%    integer N, the number of unknowns.
%
%    real X(N), the evaluation point.
%
%  Output:
%
%    real F(M), the value of the functions evaluated at X.
%
  f = zeros ( m, 1 );

  f(1) = x(1) + 10.0 * x(2);
  f(2) = sqrt ( 5.0 ) * ( x(3) - x(4) );
  f(3) = ( x(2) - 2.0 * x(3) )^2;
  f(4) = sqrt ( 10.0 ) * ( x(1) - x(4) )^2;

  return
end
