function laguerre_exactness_test ( n, x, w, p_max )

%*****************************************************************************80
%
%% LAGUERRE_EXACTNESS_TEST investigates exactness of Laguerre quadrature.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license. 
%
%  Modified:
%
%    16 May 2014
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer N, the number of points in the rule.
%
%    Input, real X(N), the quadrature points.
%
%    Input, real W(N), the quadrature weights.
%
%    Input, integer P_MAX, the maximum exponent.
%    0 <= P_MAX.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'LAGUERRE_EXACTNESS_TEST:\n' );
  fprintf ( 1, '  Laguerre rule of order N = %d\n', n );
  fprintf ( 1, '  Degree          Relative Error\n' );
  fprintf ( 1, '\n' );

  for p = 0 : p_max

    e = laguerre_monomial_quadrature ( n, x, w, p );

    fprintf ( 1, '  %6d  %24.16f\n', p, e );

  end

  return
end

