function f = p23_f ( m, n, x )

%*****************************************************************************80
%
%% p23_f() evaluates the M nonlinear functions for problem 23.
%
%  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.0426149; 0.0352053; 0.0878058; 0.0330812; 0.0580924; ...
    0.649704;  0.344144; -0.627443;  0.001828; -0.224783 ];

  B = [ ...
     0.354033,     -0.230349E-01, -0.211938,     -0.554288E-01,  0.220429; ...
    -0.230349E-01,  0.291350,     -0.180333E-02, -0.111141,      0.485461E-01; ...
    -0.211938,     -0.180333E-02,  0.815808,     -0.133538,     -0.380670; ...
    -0.554288E-01, -0.111141,     -0.133538,      0.389198,     -0.131586; ...
     0.220429,      0.485461E-01, -0.380670,     -0.131586,      0.534706 ];

  C = [ ...
    -0.564255,  0.392417, -0.404979,     0.927589, -0.735083E-01; ...
     0.535493,  0.658799, -0.636666,    -0.681091, -0.869487; ...
     0.586387,  0.289826,  0.854402,     0.789312,  0.949721; ...
     0.608734,  0.984915,  0.375699,     0.239547,  0.463136; ...
     0.774227,  0.325421, -0.151719,     0.448051,  0.149926; ...
    -0.435033, -0.688583,  0.222278,    -0.524653,  0.413248; ...
     0.759468, -0.627795,  0.403142E-01, 0.724666, -0.182537E-01; ...
    -0.152448, -0.546437,  0.484134,     0.353951,  0.887866; ...
    -0.821772, -0.53412,  -0.798498,    -0.658572,  0.662362; ...
     0.819831, -0.910632, -0.480344,    -0.871758, -0.978666 ];

  d = [ ...
    0.234659E+01; 0.284048E+01;  0.113888E+01; 0.302286E+01;  0.172139E+01;...
    0.153917;     0.290577;     -0.159378;     0.546910E+02; -0.444873 ];

  xbx = x' * ( B * x );

  f(1:m) = a(1:m) + C * x + 0.5 * d(1:m) * xbx;

  return
end
