function dif_value_test ( )

%*****************************************************************************80
%
%% dif_value_test() tests dif_value().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    16 November 2019
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'dif_value_test():\n' );
  fprintf ( 1, '  dif_value() evaluates a divided difference polynomial.\n' );
%
%  Set XTAB, YTAB to X, exp(x).
%
  ntab = 4;
  xtab = 1:ntab;
  ytab(1:ntab) = exp ( xtab(1:ntab) );

  r8vec2_print ( ntab, xtab, ytab, '  The data to be processed:' );

  diftab = data_to_dif ( ntab, xtab, ytab );

  dif_print ( ntab, xtab, diftab, '  The divided difference polynomial:' );
%
%  Evaluate the polynomial between 2 and 3.
%
  n = 11;
  x = linspace ( 2.0, 3.0, n );
  y = dif_value ( ntab, xtab, diftab, x );
  r8vec2_print ( n, x, y, '  Polynomial values:' );

  return
end

