function rng_cliff_test01 ( )

%*****************************************************************************80
%
%% rng_cliff_test01() tests rng_cliff_next().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    12 August 2019
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'rng_cliff_test01()\n' );
  fprintf ( 1, '  rng_cliff_next() computes the next entry in the\n' );
  fprintf ( 1, '  Cliff pseudorandom number generator sequence.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '       i         r(i)\n' );
  fprintf ( 1, '\n' );

  for i = 0 : 10
    if ( i == 0 )
      r = 0.5;
    else
      r = rng_cliff_next ( r );
    end
    fprintf ( 1, '  %6d  %16.8f\n', i, r );
  end

  return
end
