function newton_value_1d_test ( )

%*****************************************************************************80
%
%% newton_value_1d_test() tests newton_value_1d().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 July 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'newton_value_1d_test():\n' );
  fprintf ( 1, '  newton_value_1d() evaluates a Newton 1d interpolant.\n' );

  nd = 5;
  xd = [ 0.0; 1.0; 2.0; 3.0; 4.0 ];
  cd = [ 24.0; -24.0; +12.0; -4.0; 1.0 ];
  r8vec2_print ( xd, cd, '  The Newton interpolant data:' );

  ni = 16;
  x_lo = 0.0;
  x_hi = 5.0;
  xi = linspace ( x_lo, x_hi, ni );

  yi = newton_value_1d ( nd, xd, cd, ni, xi );

  r8vec2_print ( xi, yi, '  Newton interpolant values:' );

  return
end
