function r8_sqrt_i4_test ( )

%*****************************************************************************80
%
%% R8_SQRT_I4_TEST tests R8_SQRT_I4.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    31 July 2018
%
%  Author:
%
%    John Burkardt
%
  i4_hi = 5000.0;
  i4_lo = -100.0;
  test_num = 10;
  seed = 123456789;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8_SQRT_I4_TEST\n' );
  fprintf ( 1, '  R8_SQRT_I4 returns the square root of an integer.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '      I1        R2=R8_SQRT_I4(I1)    R3=R2*R2\n' );
  fprintf ( 1, '\n' );

  for test = 1 : test_num
    [ i1, seed ] = i4_uniform_ab ( i4_lo, i4_hi, seed );
    r2 = r8_sqrt_i4 ( i1 );
    r3 = r2 * r2;
    fprintf ( 1, '  %8d  %16.8g  %12.4g\n', i1, r2, r3 );
  end

  return
end
