function r8_factorial_stirling_test ( )

%*****************************************************************************80
%
%% r8_factorial_stirling_test() tests r8_factorial_stirling();
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    28 July 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8_factorial_stirling_test():\n' );
  fprintf ( 1, '  r8_factorial_stirling() computes Stirling''s\n' );
  fprintf ( 1, '  approximate factorial function;\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  N      Factorial    Factorial\n' );
  fprintf ( 1, '         Stirling\n' );
  fprintf ( 1, '\n' );

  f2 = 1.0;
  for i = 1 : 20
    f1 = r8_factorial_stirling ( i );
    f2 = f2 * i;
    fprintf ( 1, '  %6d  %14g  %14g\n', i, f1, f2 );
  end

  return
end
