function i4poly_dif_test ( )

%*****************************************************************************80
%
%% i4poly_dif_test() tests i4poly_dif().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    21 November 2013
%
%  Author:
%
%    John Burkardt
%
  test_num = 2;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'i4poly_dif_test():\n' );
  fprintf ( 1, '  i4poly_dif() computes derivatives of an I4POLY.\n' );
  fprintf ( 1, '\n' );
%
%  1: Differentiate X^3 + 2*X^2 - 5*X - 6 once.
%  2: Differentiate X^4 + 3*X^3 + 2*X^2 - 2  3 times.
%
  for test = 1 : test_num

    if ( test == 1 )
      na = 3;
      d = 1;
      a = [ -6, -5, 2, 1 ];
    elseif ( test == 2 )
      na = 4;
      d = 3;
      a = [ -2, 5, 2, 3, 1 ];
    end

    i4poly_print ( na, a, '  The polynomial A:' );

    fprintf ( 1, '\n' );
    fprintf ( 1, '  Differentiate A %d times.', d );

    b = i4poly_dif ( na, a, d );
 
    i4poly_print ( na - d, b, '  The derivative, B:' );

  end

  return
end
