function glo_test ( )

%*****************************************************************************80
%
%% glo_test() uses glo_order() + gqu() for 1D quadrature over [0,1].
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 April 2014
%
%  Author:
%
%    John Burkardt
%
  d = 1;
  exact = legendre_integral ( d );

  fprintf ( 1, '\n' );
  fprintf ( 1, 'glo_test():\n' );
  fprintf ( 1, '  glo_order() + gqu2():\n' );
  fprintf ( 1, '  Gauss-Legender Odd quadrature over [0,1]:\n' );
  fprintf ( 1, '  Exact integral is %16.8g\n', exact );
  fprintf ( 1, '\n' );
  fprintf ( 1, '   Level   Nodes    Estimate  Error\n' );
  fprintf ( 1, '\n' );

  for l = 1 : 10

    n = glo_order ( l );

    [ x, w ] = gqu2 ( n );

    fx = legendre_integrand ( d, n, x );
    q = w' * fx;
    e = sqrt ( ( q - exact ).^2 ) / exact;

    fprintf ( 1, '  %2d     %6d  %10.5g  %10.5g\n', l, n, q, e )

  end

  return
end
