function polynomial_multiply_test ( )

%*****************************************************************************80
%
%% polynomial_multiply_test() tests polynomial_multiply().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 October 2022
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../polynomial_multiply' )

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'polynomial_multiply_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  Test polynomial_multiply().\n' );

  p1 = [ 0, 2, 0, 4 ];
  p2 = polynomial_multiply ( p1, p1 );
  p3 = polynomial_multiply ( p1, p2 );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  p1(x) = 2 x + 4 x^3' );
  disp ( p1 );
  fprintf ( 1, '  p2(x) = p1(x) * p1(x)' );
  disp ( p2 );
  fprintf ( 1, '  p3(x) = p1(x) * p2(x)' );
  disp ( p3 );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'polynomial_multiply():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../polynomial_multiply' )

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the current YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  t = now;
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

