function f = p17_f ( m, n, x )

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

  y = [ ...
    0.844; 0.908; 0.932; 0.936; 0.925; ...
    0.908; 0.881; 0.850; 0.818; 0.784; ...
    0.751; 0.718; 0.685; 0.658; 0.628; ...
    0.603; 0.580; 0.558; 0.538; 0.522; ...
    0.506; 0.490; 0.478; 0.467; 0.457; ...
    0.448; 0.438; 0.431; 0.424; 0.420; ...
    0.414; 0.411; 0.406 ];

  for i = 1 : 33

    f(i) = y(i) - ( x(1) ...
      + x(2) * exp ( - x(4) * 10.0 * ( i - 1 ) ) ...
      + x(3) * exp ( - x(5) * 10.0 * ( i - 1 ) ) );
  end 

  return
end
