function i4_factorial_test ( )

%*****************************************************************************80
%
%% I4_FACTORIAL_TEST tests I4_FACTORIAL.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    12 May 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'I4_FACTORIAL_TEST\n' );
  fprintf ( 1, '  I4_FACTORIAL evaluates the factorial function.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '         N      Exact         I4_FACTORIAL(N)\n' );

  n_data = 0;

  while ( true )

    [ n_data, n, f1 ] = i4_factorial_values ( n_data );

    if ( n_data == 0 )
      break
    end

    f2 = i4_factorial ( n );

    fprintf ( 1, '  %8d  %12d  %12d\n', n, f1, f2 );

  end
 
  return
end
