function r8poly_norm_test ( )

%*****************************************************************************80
%
%% r8poly_norm_test() tests r8poly_norm().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 October 2019
%
%  Author:
%
%    John Burkardt
%
  ntest = 1;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8poly_norm_test\n' );
  fprintf ( 1, '  r8poly_norm() computes the norm of a polynomial.\n' );
  fprintf ( 1, '\n' );

  for itest = 1 : ntest

    if ( itest == 1 )
      n = 1;
      c(1:n+1) = [ 3.0; -2.0 ];
      a = 0.0;
      b = 1.0;
      norm_exact = sqrt ( 13.0 / 3.0 );
    end

    norm_computed = r8poly_norm ( n, c, a, b );

    r8poly_print ( c, '  The polynomial:' );

    fprintf ( 1, '  Computed norm over [%g,%g] = %g\n', a, b, norm_computed );
    fprintf ( 1, '  Correct norm  over [%g,%g] = %g\n', a, b, norm_exact );

  end

  return
end
