function chebyshev_to_monomial_test ( )

%*****************************************************************************80
%
%% chebyshev_to_monomial_test() tests chebyshev_to_monomial().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    18 February 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'chebyshev_to_monomial_test ( )\n' );
  fprintf ( 1, '  chebyshev_to_monomial() converts a\n' );
  fprintf ( 1, '  polynomial from Chebyshev form\n' );
  fprintf ( 1, '  to monomial form.\n' );

  nmax = 6;

  fprintf ( 1, '\n' );
  fprintf ( 1, '           ' );
  for k = 0 : nmax
    fprintf ( 1, 'X^%d     ', k );
  end
  fprintf ( 1, '\n' );
  fprintf ( 1, '\n' );

  for n = 0 : nmax
    ccoef = zeros ( n + 1, 1 );
    ccoef(n+1) = 1.0;
    mcoef = chebyshev_to_monomial ( n, ccoef );
    fprintf ( 1, 'T%d(x) = ', n );
    for k = 0 : n
      fprintf ( 1, '%8.3f', mcoef(k+1) );
    end
    fprintf ( 1, '\n' );
  end

  return
end
