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

%*****************************************************************************80
%
%% rule08() returns the rule of degree 8.
%
%  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.6306801197316689E+00, ...
    0.9688499663619776E+00, ...
   -0.6306801197316687E+00, ...
   -0.9688499663619776E+00, ...
   -0.7502770999789002E+00, ...
    0.9279616459595696E+00, ...
    0.7502770999789005E+00, ...
   -0.9279616459595696E+00, ...
   -0.7620832819261708E-01, ...
    0.8526157293336623E+00, ...
    0.7620832819261719E-01, ...
   -0.8526157293336623E+00, ...
   -0.5237358202144292E+00, ...
    0.4533398211356472E+00, ...
    0.5237358202144292E+00, ...
   -0.4533398211356471E+00, ...
    0.1018964154952896E-32 ];
  ys = [ ...
   -0.9688499663619776E+00, ...
    0.6306801197316688E+00, ...
    0.9688499663619776E+00, ...
   -0.6306801197316686E+00, ...
   -0.9279616459595696E+00, ...
   -0.7502770999789004E+00, ...
    0.9279616459595696E+00, ...
    0.7502770999789006E+00, ...
   -0.8526157293336623E+00, ...
   -0.7620832819261714E-01, ...
    0.8526157293336623E+00, ...
    0.7620832819261725E-01, ...
   -0.4533398211356472E+00, ...
   -0.5237358202144292E+00, ...
    0.4533398211356471E+00, ...
    0.5237358202144292E+00, ...
   -0.7403196379681869E-32 ];
  ws = [ ...
    0.6284721101179121E-01, ...
    0.6284721101179121E-01, ...
    0.6284721101179121E-01, ...
    0.6284721101179121E-01, ...
    0.7926638883415160E-01, ...
    0.7926638883415160E-01, ...
    0.7926638883415160E-01, ...
    0.7926638883415160E-01, ...
    0.1902480253324004E+00, ...
    0.1902480253324004E+00, ...
    0.1902480253324004E+00, ...
    0.1902480253324004E+00, ...
    0.2816282136297291E+00, ...
    0.2816282136297291E+00, ...
    0.2816282136297291E+00, ...
    0.2816282136297291E+00, ...
    0.3724677695139019E+00 ];

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

  return
end
