function r8poly_ant_value_test ( )

%*****************************************************************************80
%
%% r8poly_ant_value_test() tests r8poly_ant_value().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    16 October 2019
%
%  Author:
%
%    John Burkardt
%
  m = 4;
  n = 16;

  c = [ 24.0; -50.0; +35.0; -10.0; 1.0 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8poly_ant_value_test\n' );
  fprintf ( 1, '  r8poly_ant_value() evaluates the antiderivative\n' );
  fprintf ( 1, '  of a polynomial at one point.\n' );

  r8poly_print ( c, '  The polynomial coefficients:' );

  x_lo = 0.0;
  x_hi = 5.0;
  x = linspace ( x_lo, x_hi, n );

  fprintf ( 1, '\n' );
  fprintf ( 1, '   I    X    antiP(X)\n' );
  fprintf ( 1, '\n' );

  for i = 1 : n
    p = r8poly_ant_value ( m, c, x(i) );
    fprintf ( 1, '  %2d  %8.4f  %14.6g\n', i, x(i), p );
  end

  return
end
