function cheb_test ( )

%*****************************************************************************80
%
%% cheb_test test cheb.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Samuel Conte, Carl de Boor,
%    Elementary Numerical Analysis,
%    Third Edition,
%    SIAM, 2017,
%    ISBN: 978-1-611975-19-2.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'cheb_test:\n' );
  fprintf ( 1, '  Test cheb()\n' );

  c = [ ...
   1.266065877752008,
   1.130318207984970,
   0.271495339534077,
   0.044336849848664,
   0.005474240442094,
   0.000542926311914,
   0.000044977322954,
   0.000003198436462,
   0.000000199212481,
   0.000000011036772,
   0.000000000550590,
   0.000000000024980,
   0.000000000001039,
   0.000000000000040,
   0.000000000000001 ];

  nx = 11;
  x = linspace ( 0.0, 5.0, nx );

  value_cheb = cheb ( c, x );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  X   cheb(exp)(x)  exp(x)\n' );
  fprintf ( 1, '\n' );

  for i = 1 : nx
    fprintf ( 1, '  %f  %g  %g\n', x(i), value_cheb(i), exp(x(i)) );
  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'cheb_test:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end
  
