function c8_sqrt_r8_test ( )

%*****************************************************************************80
%
%% C8_SQRT_R8_TEST tests C8_SQRT_R8.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    31 July 2018
%
%  Author:
%
%    John Burkardt
%
  r8_hi = +100.0;
  r8_lo = -100.0;
  test_num = 10;
  seed = 123456789;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'C8_SQRT_R8_TEST\n' );
  fprintf ( 1, '  C8_SQRT_R8 returns the square root of an R8.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '          R1        C2=C8_SQRT_R8(R1)            R3=C2*C2\n' );
  fprintf ( 1, '\n' );

  for test = 1 : test_num
    [ r1, seed ] = r8_uniform_ab ( r8_lo, r8_hi, seed );
    c2 = c8_sqrt_r8 ( r1 );
    r3 = c2 * c2;
    fprintf ( 1, '  %12.4g  (%12.4g,%12.4g)  %12.4g\n', ...
      r1, real(c2), imag(c2), r3 );
  end

  return
end
