function [ c, x ] = differ_forward ( h, o, p )

%*****************************************************************************80
%
%% differ_forward() computes forward difference coefficients.
%
%  Discussion:
%
%    We determine coefficients C to approximate the derivative at X0
%    of order O and precision P, using equally spaced forward
%    differences, so that 
%
%      d^o f(x)/dx^o = sum ( 0 <= i <= o+p-1 ) c(i) f(x+ih) + O(h^(p))
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 January 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real H, the spacing.  0 < H.
%
%    integer O, the order of the derivative to be approximated.
%    1 <= O.
%
%    integer P, the order of the error, as a power of H.
%
%  Output:
%
%    real C(O+P), the coefficients.
%
%    real X(O+P), the evaluation points.
%
  n = o + p;
  x = ( 0 : n - 1 )' * h;
  a = vand1 ( n, x );

  b = zeros ( n, 1 );
  b(o+1) = 1.0;

  c = a \ b;

  c = c * factorial ( o );

  return
end
