function harmonic_test ( )

%*****************************************************************************80
%
%% harmonic_test() tests harmonic().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 May 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'harmonic_test():\n' );
  fprintf ( 1, '  harmonic() evaluates Harmonic numbers.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '       N                H(n)                  H(n)\n' );
  fprintf ( 1, '                        tabulated            computed\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( true )

    [ n_data, n, h1 ] = harmonic_values ( n_data );

    if ( n_data == 0 )
      break
    end

    h2 = harmonic ( n );

    fprintf ( 1, '  %6d  %20.10g  %20.10g\n', n, h1, h2 );

  end

  return
end
