function halton_base_test ( )

%*****************************************************************************80
%
%% halton_base_test() tests halton_base().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    11 August 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'halton_base_test()\n' );
  fprintf ( 1, '  HALTON_BASE returns the I-th element of an M-dimensional\n' );
  fprintf ( 1, '  Halton sequence, using user-specified bases.\n' );

  m = 3;
  b = [ 2, 3, 5 ];
  fprintf ( 1, '\n' );
  fprintf ( 1, '  M = %d\n', m );
  fprintf ( 1, '   B:' );
  for j = 1 : m
    fprintf ( 1, '  %14d', b(j) );
  end
  fprintf ( 1, '\n' );
  for i = 0 : 10
    r = halton_base ( i, m, b );
    fprintf ( 1, '  %3d', i );
    for j = 1 : m
      fprintf ( 1, '  %14.8f', r(j) );
    end
    fprintf ( 1, '\n' );
  end

  m = 3;
  b = [ 3, 10, 2 ];
  fprintf ( 1, '\n' );
  fprintf ( 1, '  M = %d\n', m );
  fprintf ( 1, '   B:' );
  for j = 1 : m
    fprintf ( 1, '  %14d', b(j) );
  end
  fprintf ( 1, '\n' );
  for i = 0 : 10
    r = halton_base ( i, m, b );
    fprintf ( 1, '  %3d', i );
    for j = 1 : m
      fprintf ( 1, '  %14.8f', r(j) );
    end
    fprintf ( 1, '\n' );
  end

  return
end
