function r8_haversine_test ( )

%*****************************************************************************80
%
%% R8_HAVERSINE_TEST tests R8_HAVERSINE.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    31 July 2018
%
%  Author:
%
%    John Burkardt
%
  n_test = 12;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8_HAVERSINE_TEST\n' );
  fprintf ( 1, '  R8_HAVERSINE computes the haversine of an angle.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Degrees  Radians  Haversine\n' );
  fprintf ( 1, '\n' );

  for i = 0 : n_test
    x = i * 2.0 * pi / n_test;
    d = r8_radians ( x );
    hx = r8_haversine ( x );
    fprintf ( 1, '  %10f  %10f  %12f\n', d, x, hx );
  end

  return
end
