function chebyquad_test ( )

%*****************************************************************************80
%
%% chebyquad_test() tests the Chebyquad function.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    31 July 2016
%
%  Author:
%
%    John Burkardt
%
  n = 8;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'chebyquad_test():\n' );
  fprintf ( 1, '  chebyquad() evaluates the Chebyquad function.\n' );

  t0 = 0.00001;
  h0 = 0.1;
  prin = 0;

  for i = 1 : n
    x(i) = i / ( n + 1 );
  end

  r8vec_print ( n, x, '  Initial point:' );

  fprintf ( 1, '  Function value = %g\n', chebyquad_f ( x, n ) );

  [ pr, x ] = praxis ( t0, h0, n, prin, x, @chebyquad_f );

  r8vec_print ( n, x, '  Computed minimizer:' );

  fprintf ( 1, '  Function value = %g\n', chebyquad_f ( x, n ) );

  return
end
