function [ x, y, w ] = rule05 ( n )

%*****************************************************************************80
%
%% rule05() returns the rule of degree 5.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 June 2023
%
%  Author:
%
%    Original FORTRAN77 version by Hong Xiao, Zydrunas Gimbutas.
%    This version by John Burkardt.
%
%  Reference:
%
%    Hong Xiao, Zydrunas Gimbutas,
%    A numerical algorithm for the construction of efficient quadrature
%    rules in two and higher dimensions,
%    Computers and Mathematics with Applications,
%    Volume 59, 2010, pages 663-676.
%
%  Input:
%
%    integer N, the number of nodes.
%
%  Output:
%
%    real x(n), y(n): the coordinates of the nodes.
%
%    real w(n): the weights.
%
  xs = [ ...
    0.1775868202077551E-01, ...
   -0.1775868202077539E-01, ...
    0.7788710544649639E+00, ...
   -0.7788710544649639E+00, ...
   -0.7703781288541645E+00, ...
    0.7703781288541645E+00, ...
   -0.7490353914168658E-33 ];
  ys = [ ...
   -0.9659285494001192E+00, ...
    0.9659285494001192E+00, ...
   -0.5715708301251639E+00, ...
    0.5715708301251639E+00, ...
   -0.5829672991828014E+00, ...
    0.5829672991828014E+00, ...
    0.1356144833394667E-33 ];
  ws = [ ...
    0.2246199725165690E+00, ...
    0.2246199725165690E+00, ...
    0.3901817339168917E+00, ...
    0.3901817339168917E+00, ...
    0.3953508381187504E+00, ...
    0.3953508381187504E+00, ...
    0.8081220356417684E+00 ];

  x = 0.5 * ( xs + 1.0 );
  y = 0.5 * ( ys + 1.0 );
  w = ws / sqrt ( 8.0 );

  return
end
