function roots_to_newton_test ( )

%*****************************************************************************80
%
%% roots_to_newton_test tests roots_to_newton.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    14 November 2019
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'roots_to_newton_test\n' );
  fprintf ( 1, '  roots_to_newton computes the coefficients of a Newton\n' );
  fprintf ( 1, '  polynomial from its roots.\n' );

  r = 3.0;
  vector_print ( r, '  The roots:' );
  [ c, z ] = roots_to_newton ( r );
  newton_print ( c, z, '  The Newton polynomial:' );

  r = [ 3.0, 1.0 ];
  vector_print ( r, '  The roots:' );
  [ c, z ] = roots_to_newton ( r );
  newton_print ( c, z, '  The Newton polynomial:' );

  r = [ 3.0, 1.0, 2.0 ];
  vector_print ( r, '  The roots:' );
  [ c, z ] = roots_to_newton ( r );
  newton_print ( c, z, '  The Newton polynomial:' );

  r = [ 3.0, 1.0, 2.0, 4.0 ];
  vector_print ( r, '  The roots:' );
  [ c, z ] = roots_to_newton ( r );
  newton_print ( c, z, '  The Newton polynomial:' );

  return
end
