function legendre_exponential_product_test ( p, b )

%*****************************************************************************80
%
%% LEGENDRE_EXPONENTIAL_PRODUCT_TEST tests LEGENDRE_EXPONENTIAL_PRODUCT.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    09 May 2008
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer P, the maximum degree of the polynomial factors.
%
%    Input, real B, the coefficient of X in the exponential factor.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'LEGENDRE_EXPONENTIAL_PRODUCT_TEST\n' );
  fprintf ( 1, '  Compute an exponentially weighted Legendre product table.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Tij = integral ( -1 <= X <= +1 ) exp(B*X) Li(X) Lj(X) dx\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  where Li(X) = Legendre polynomial of degree i.\n' );

  if ( nargin < 1 )
    fprintf ( 1, '\n' );
    p = input ( '  Enter maximum degree P so that 0 <= P.' );
  end

  if ( nargin < 2 )
    fprintf ( 1, '\n' );
    b = input ( '  Enter B, the coefficient of X in the exponential factor.' );
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Maximum degree P = %d\n', p );
  fprintf ( 1, '  Exponential argument coefficient B = %f\n', b );

  table = legendre_exponential_product ( p, b);

  r8mat_print ( p+1, p+1, table, '  Exponentially weighted table:' );

  return
end
