function r8poly_nx_test ( )

%*****************************************************************************80
%
%% r8poly_nx_test() tests r8poly_nx().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    06 June 2015
%
%  Author:
%
%    John Burkardt
%
  n = 3;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8poly_nx_test():\n' );
  fprintf ( 1, '  r8poly_nx() replaces one abscissa in a Newton polynomial.\n' );

  a = r8vec_indicator1 ( n );
  xarray = r8vec_indicator1 ( n );
 
  r8vec_print ( n, a, '  Newton polynomial coefficients:' );
  r8vec_print ( n, xarray, '  Newton polynomial abscissas:' );
%
%  Shift the X array by inserting X=0.
%
  x = 0.0;
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Replace one abscissa by X = %g\n', x );

  [ a, xarray ] = r8poly_nx ( n, a, xarray, x );
%
%  Report the new polynomial form.
%
  r8vec_print ( n, a, '  Newton polynomial coefficients:' );
  r8vec_print ( n, xarray, '  Newton polynomial abscissas:' );

  return
end
