function f = p09_f ( m, n, x )

%*****************************************************************************80
%
%% p09_f() evaluates the M nonlinear functions for problem 9.
%
%  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 );

  v = [ ...
    4.0;   2.0;   1.0; 0.5;    0.25; ...
    0.167; 0.125; 0.1; 0.0833; 0.0714; ...
    0.0625 ];

  y = [ ...
    0.1957; 0.1947; 0.1735; 0.1600; 0.0844; ...
    0.0627; 0.0456; 0.0342; 0.0323; 0.0235; ...
    0.0246 ];

  f(1:11) = y(1:11) - x(1) * ( v(1:11) .* ( v(1:11) + x(2) ) ) ...
    ./ ( v(1:11) .* ( v(1:11) + x(3) ) + x(4) );

  return
end
