function r8_add_test ( )

%*****************************************************************************80
%
%% R8_ADD_TEST tests R8_ADD.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 May 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8_ADD_TEST\n' );
  fprintf ( 1, '  R8_ADD adds two R8''s.\n' ); 
  fprintf ( 1, '\n' );
  fprintf ( 1, '       R1             R2              R3              R4\n' );
  fprintf ( 1, '                                      R1+R2     R8_ADD(R1,R2)\n' );
  fprintf ( 1, '\n' );

  r8_lo = - 500.0;
  r8_hi = + 500.0;
  seed = 123456789;

  for test = 1 : 5

    [ r1, seed ] = r8_uniform_ab ( r8_lo, r8_hi, seed );
    [ r2, seed ] = r8_uniform_ab ( r8_lo, r8_hi, seed );
    r3 = r1 + r2;
    r4 = r8_add ( r1, r2 );

    fprintf ( 1, '  %14.6g  %14.6g  %14.6g  %14.6g\n', r1, r2, r3, r4 );

  end

  return
end
