function f = p19_f ( m, n, x )

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

  a = [ ...
    0.0;  1.0;  2.0;  3.0;  4.0; ...
    5.0;  6.0;  8.0; 10.0; 12.0; ...
   15.0; 20.0; 25.0; 30.0; 40.0; ...
   50.0 ];

  b = [ ...
    0.0;  1.0;  2.0;  3.0;  5.0; ...
    6.0;  8.0; 11.0; 13.0; 12.0; ...
    9.0;  6.0;  3.0;  2.0;  1.5; ...
    1.0 ];

  f(1:16) = x(1) * sin ( x(2) * a(1:16) ) - b(1:16);

  return
end
