function dif_to_r8poly_test ( )

%*****************************************************************************80
%
%% dif_to_r8poly_test() tests dif_to_r8poly().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    16 November 2019
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'dif_to_r8poly_test():\n' );
  fprintf ( 1, '  dif_to_r8poly() converts a divided difference polynomial\n' );
  fprintf ( 1, '  to the standard power form\n' );
  fprintf ( 1, '\n' );

  nroots = 1;
  r = 3.0;
  r8vec_print ( nroots, r, '  The roots:' );
  [ ntab, xtab, diftab ] = roots_to_dif ( nroots, r );
  c = dif_to_r8poly ( ntab, xtab, diftab );
  r8poly_print ( c, '  The polynomial:' );

  nroots = 2;
  r = [ 3.0, 1.0 ];
  r8vec_print ( nroots, r, '  The roots:' );
  [ ntab, xtab, diftab ] = roots_to_dif ( nroots, r );
  c = dif_to_r8poly ( ntab, xtab, diftab );
  r8poly_print ( c, '  The polynomial:' );

  nroots = 3;
  r = [ 3.0, 1.0, 2.0 ];
  r8vec_print ( nroots, r, '  The roots:' );
  [ ntab, xtab, diftab ] = roots_to_dif ( nroots, r );
  c = dif_to_r8poly ( ntab, xtab, diftab );
  r8poly_print ( c, '  The polynomial:' );

  nroots = 4;
  r = [ 3.0, 1.0, 2.0, 4.0 ];
  r8vec_print ( nroots, r, '  The roots:' );
  [ ntab, xtab, diftab ] = roots_to_dif ( nroots, r );
  c = dif_to_r8poly ( ntab, xtab, diftab );
  r8poly_print ( c, '  The polynomial:' );

  return
end
