function i4_to_van_der_corput_test ( )

%*****************************************************************************80
%
%% i4_to_van_der_corput_test() tests i4_to_van_der_corput().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  n_prime = 5;
  n_test = 10;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'i4_to_van_der_corput_test():\n' );
  fprintf ( 1, '  i4_to_van_der_corput() computes the elements \n' );
  fprintf ( 1, '  of a van der Corput sequence.\n' );
  fprintf ( 1, '  The sequence depends on the prime numbers used \n' );
  fprintf ( 1, '  as a base.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'Bases:\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '    ' );
  for j = 1 : n_prime
    fprintf ( 1, '        %6d', prime ( j ) );
  end
  fprintf ( 1, '\n' );
  fprintf ( 1, '\n' );

  for i = 1 : n_test
    for j = 1 : n_prime
      p = prime(j);
      h(j) = i4_to_van_der_corput ( i, p );
    end
    fprintf ( 1, '  %2d', i );
    for j = 1 : n_prime
      fprintf ( 1, '  %12f', h(j) );
    end
    fprintf ( 1, '\n' );
  end

  return
end
