function dvec_sub_test ( )

%*****************************************************************************80
%
%% DVEC_SUB_TEST tests DVEC_SUB;
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  n = 10;
  seed = 123456789;
  test_num = 10;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'DVEC_SUB_TEST\n' );
  fprintf ( 1, '  DVEC_SUB subtracts decimal vectors representing integers;\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '        I        J        L = I - J\n' );
  fprintf ( 1, '\n' );

  for test = 1 : test_num
    
    [ i, seed ] = i4_uniform_ab ( -100, 100, seed );
    [ j, seed ] = i4_uniform_ab ( -100, 100, seed );

    fprintf ( 1, '\n' );

    fprintf ( 1, '  %8d  %8d\n', i, j );

    l = i - j;

    fprintf ( 1, '  Directly:           %8d\n', l );

    dvec1 = i4_to_dvec ( i, n );
    dvec2 = i4_to_dvec ( j, n );

    dvec4 = dvec_sub ( n, dvec1, dvec2 );
    l = dvec_to_i4 ( n, dvec4 );

    fprintf ( 1, '  DVEC_SUB  %8d\n', l );

  end

  return
end
