function bvec_mul_test ( )

%*****************************************************************************80
%
%% bvec_mul_test() tests bvec_mul();
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 January 2015
%
%  Author:
%
%    John Burkardt
%
  n = 15;
  test_num = 10;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'bvec_mul_test():\n' );
  fprintf ( 1, '  bvec_mul() multiplies binary vectors \n' );
  fprintf ( 1, '  representing integers;\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '        I        J        I * J   BVEC_MUL\n' );
  fprintf ( 1, '\n' );

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

    k = i * j;

    bvec1 = i4_to_bvec ( i, n );
    bvec2 = i4_to_bvec ( j, n );
    bvec3 = bvec_mul ( n, bvec1, bvec2 );
    l = bvec_to_i4 ( n, bvec3 );

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

  end

  return
end
