function pyramid_jaskowiec_rule_test01 ( p )

%*****************************************************************************80
%
%% pyramid_jaskowiec_rule_test01() computes a quadrature rule of precision P.
%
%  Licensing:
%
%    This code is distributed under the GNU GPL license.
%
%  Modified:
%
%    26 May 2023
%
%  Author:
%
%    John Burkardt.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'pyramid_jaskowiec_rule_test01():\n' );
  fprintf ( 1, '  Quadrature rule for the unit pyramid,\n' );
  fprintf ( 1, '  Precision p = %d\n', p );
%
%  Retrieve the rule.
%
  [ n, x, y, z, w ] = pyramid_jaskowiec_rule ( p );
%
%  Print the rule.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '     I      W          X           Y           Z\n' );
  fprintf ( 1, '\n' );
  for i = 1 : n
    fprintf ( 1, '  %4d  %10.6g  %10.6g  %10.6g  %10.6g\n', ...
      i, w(i), x(i), y(i), z(i) );
  end
%
%  Verify that the weights add to 1.
%
  w_sum = sum ( w(1:n) );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Weight Sum    %g\n', w_sum );

  return
end
