function r8_agm_test ( )

%*****************************************************************************80
%
%% r8_agm_test() tests r8_agm().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 July 2021
%
%  Author:
%
%    John Burkardt
% 
  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8_agm_test():\n' );
  fprintf ( 1, '  r8_agm() computes the arithmetic-geometric mean (AGM)\n' );
  fprintf ( 1, '  of two nonnegative real numbers.\n' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '    X        Y    R8_AGM(X,Y)\n' );
  fprintf ( 1, '\n' );

  for i = 1 : 10
    x = 1.0 + 9.0 * rand ( 1, 1 );
    y = 1.0 + 9.0 * rand ( 1, 1 );
    z = r8_agm ( x, y );
    fprintf ( 1, '  %8f  %8f  %8f\n', x, y, z );
  end

  return
end
