function benford_cdf_test ( )

%*****************************************************************************80
%
%% BENFORD_CDF_TEST tests BENFORD_CDF.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    03 March 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'BENFORD_CDF_TEST\n' );
  fprintf ( 1, '  BENFORD_CDF evaluates the Benford CDF.\n' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '       N          CDF(N)          CDF(N) by summing\n' );
  fprintf ( 1, '\n' );

  cdf2 = 0.0;
  for n = 1 : 9
    cdf = benford_cdf ( n );
    pdf = benford_pdf ( n );
    cdf2 = cdf2 + pdf;
    fprintf ( 1, '  %6d  %14g  %14g\n', n, cdf, cdf2 );
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, '       N          CDF(N)          CDF(N) by summing\n' );
  fprintf ( 1, '\n' );

  cdf2 = 0.0;
  for n = 10 : 99
    cdf = benford_cdf ( n );
    pdf = benford_pdf ( n );
    cdf2 = cdf2 + pdf;
    fprintf ( 1, '  %6d  %14g  %14g\n', n, cdf, cdf2 );
  end

  return
end
