function p00_f_test ( )

%*****************************************************************************80
%
%% p00_f_test() evaluates the objective function at each starting point.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    03 December 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'p00_f_test():\n' );
  fprintf ( 1, '  p00_f() evaluates the objective function F(X).\n' );
  fprintf ( 1, '  In this test, we evaluate F at a typical starting point.\n' );
%
%  Get the number of problems.
%
  problem_num = p00_problem_num ( );

  for problem = 1 : problem_num

    if ( problem == 25 )
      p = 0.0;
      p25_p_set ( p );
    end

    if ( problem == 36 )
      p36_p_init ( );
    end

    title = p00_title ( problem );

    fprintf ( 1, '\n' );
    fprintf ( 1, '  %d: "%s"\n', problem, title );
%
%  Get or choose the problem size.
%
    n = p00_n ( problem );

    n_min = n;

    if ( n < 0 )
      n_min = abs ( n_min );
      n = max ( n_min, 4 );
    end
%
%  Get the starting point and objective function value.
%
    x = p00_start ( problem, n );

    f_start = p00_f ( problem, n, x );

    fprintf ( 1, '  F(X_START) = %g\n', f_start );

  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'p00_f_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end
