function r8poly_add_test ( )

%*****************************************************************************80
%
%% R8POLY_ADD_TEST tests R8POLY_ADD.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license. 
%
%  Modified:
%
%    28 May 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8POLY_ADD_TEST\n' );
  fprintf ( 1, '  R8POLY_ADD adds two R8POLY''s.\n' );

  na = 5;
  a = [ 0.0,  1.1, 2.2, 3.3, 4.4,  5.5 ];
  nb = 5;
  b = [ 1.0, -2.1, 7.2, 8.3, 0.0, -5.5 ];

  c = r8poly_add ( na, a, nb, b );

  r8poly_print ( na, a, '  Polynomial A:' );

  r8poly_print ( nb, b, '  Polynomial B:' );

  nc = max ( na, nb );

  nc2 = r8poly_degree ( nc, c );

  r8poly_print ( nc2, c, '  Polynomial C = A+B:' );

  return
end
