function [ xtab, weight ] = clenshaw_curtis_rule_set ( order )

%*****************************************************************************80
%
%% CLENSHAW_CURTIS_RULE_SET sets a Clenshaw-Curtis quadrature rule.
%
%  Discussion:
%
%    The integration interval is [ -1, 1 ].
%
%    The integral to approximate:
%
%      Integral ( -1 <= X <= 1 ) F(X) dX
%
%    The quadrature rule:
%
%      Sum ( 1 <= I <= ORDER ) WEIGHT(I) * F ( XTAB(I) )
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    18 May 2006
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Charles Clenshaw and A Curtis,
%    A Method for Numerical Integration on an Automatic Computer,
%    Numerische Mathematik,
%    Volume 2, Number 1, pages 197-205.
%
%  Parameters:
%
%    Input, integer ORDER, the order of the rule.
%    ORDER must be between 1 and 17, 33, 65 or 129.
%
%    Output, real XTAB(ORDER), the abscissas of the rule.
%
%    Output, real WEIGHT(ORDER), the weights of the rule.
%    The weights are symmetric and sum to 2.
%
  if ( order == 1 )

    xtab(1) = 0.0;
    weight(1) = 2.0;

  elseif ( order == 2 )

    xtab(1) = -1.0;
    xtab(2) =  1.0;

    weight(1) = 1.0;
    weight(2) = 1.0;

  elseif ( order == 3 )

    xtab(1) = -1.0;
    xtab(2) =  0.0;
    xtab(3) =  1.0;

    weight(1) =  0.33333333333333;
    weight(2) =  1.33333333333333;
    weight(3) =  0.33333333333333;

  elseif ( order == 4 )

    xtab(1) = -1.0;
    xtab(2) = -0.5;
    xtab(3) =  0.5;
    xtab(4) =  1.0;

    weight(1) =  0.11111111111111;
    weight(2) =  0.88888888888889;
    weight(3) =  0.88888888888889;
    weight(4) =  0.11111111111111;

  elseif ( order == 5 )

    xtab(1) = -1.00000000000000;
    xtab(2) = -0.70710678118655;
    xtab(3) =  0.00000000000000;
    xtab(4) =  0.70710678118655;
    xtab(5) =  1.00000000000000;

    weight(1) =  0.06666666666667;
    weight(2) =  0.53333333333333;
    weight(3) =  0.80000000000000;
    weight(4) =  0.53333333333333;
    weight(5) =  0.06666666666667;

  elseif ( order == 6 )

    xtab(1) = -1.00000000000000;
    xtab(2) = -0.80901699437495;
    xtab(3) = -0.30901699437495;
    xtab(4) =  0.30901699437495;
    xtab(5) =  0.80901699437495;
    xtab(6) =  1.00000000000000;

    weight(1) =  0.04000000000000;
    weight(2) =  0.36074304120001;
    weight(3) =  0.59925695879999;
    weight(4) =  0.59925695879999;
    weight(5) =  0.36074304120001;
    weight(6) =  0.04000000000000;

  elseif ( order == 7 )

    xtab(1) = -1.00000000000000;
    xtab(2) = -0.86602540378444;
    xtab(3) = -0.50000000000000;
    xtab(4) =  0.00000000000000;
    xtab(5) =  0.50000000000000;
    xtab(6) =  0.86602540378444;
    xtab(7) =  1.00000000000000;

    weight(1) = 0.02857142857143;
    weight(2) = 0.25396825396825;
    weight(3) = 0.45714285714286;
    weight(4) = 0.52063492063492;
    weight(5) = 0.45714285714286;
    weight(6) = 0.25396825396825;
    weight(7) = 0.02857142857143;

  elseif ( order == 8 )

    xtab(1) = -1.00000000000000;
    xtab(2) = -0.90096886790242;
    xtab(3) = -0.62348980185873;
    xtab(4) = -0.22252093395631;
    xtab(5) =  0.22252093395631;
    xtab(6) =  0.62348980185873;
    xtab(7) =  0.90096886790242;
    xtab(8) =  1.00000000000000;

    weight(1) = 0.02040816326531;
    weight(2) = 0.19014100721821;
    weight(3) = 0.35224242371816;
    weight(4) = 0.43720840579833;
    weight(5) = 0.43720840579833;
    weight(6) = 0.35224242371816;
    weight(7) = 0.19014100721821;
    weight(8) = 0.02040816326531;

  elseif ( order == 9 )

    xtab(1) = -1.00000000000000;
    xtab(2) = -0.92387953251129;
    xtab(3) = -0.70710678118655;
    xtab(4) = -0.38268343236509;
    xtab(5) =  0.00000000000000;
    xtab(6) =  0.38268343236509;
    xtab(7) =  0.70710678118655;
    xtab(8) =  0.92387953251129;
    xtab(9) =  1.00000000000000;

    weight(1) = 0.01587301587302;
    weight(2) = 0.14621864921602;
    weight(3) = 0.27936507936508;
    weight(4) = 0.36171785872049;
    weight(5) = 0.39365079365079;
    weight(6) = 0.36171785872049;
    weight(7) = 0.27936507936508;
    weight(8) = 0.14621864921602;
    weight(9) = 0.01587301587302;

  elseif ( order == 10 )

    xtab(1) =  -1.00000000000000;
    xtab(2) =  -0.93969262078591;
    xtab(3) =  -0.76604444311898;
    xtab(4) =  -0.50000000000000;
    xtab(5) =  -0.17364817766693;
    xtab(6) =   0.17364817766693;
    xtab(7) =   0.50000000000000;
    xtab(8) =   0.76604444311898;
    xtab(9) =   0.93969262078591;
    xtab(10) =  1.00000000000000;

    weight(1) =  0.01234567901235;
    weight(2) =  0.11656745657204;
    weight(3) =  0.22528432333810;
    weight(4) =  0.30194003527337;
    weight(5) =  0.34386250580414;
    weight(6) =  0.34386250580414;
    weight(7) =  0.30194003527337;
    weight(8) =  0.22528432333810;
    weight(9) =  0.11656745657204;
    weight(10) = 0.01234567901235;

  elseif ( order == 11 )

    xtab(1) =  -1.00000000000000;
    xtab(2) =  -0.95105651629515;
    xtab(3) =  -0.80901699437495;
    xtab(4) =  -0.58778525229247;
    xtab(5) =  -0.30901699437495;
    xtab(6) =   0.00000000000000;
    xtab(7) =   0.30901699437495;
    xtab(8) =   0.58778525229247;
    xtab(9) =   0.80901699437495;
    xtab(10) =  0.95105651629515;
    xtab(11) =  1.00000000000000;

    weight(1) =  0.01010101010101;
    weight(2) =  0.09457905488370;
    weight(3) =  0.18563521442425;
    weight(4) =  0.25358833328369;
    weight(5) =  0.29921327042424;
    weight(6) =  0.31376623376623;
    weight(7) =  0.29921327042424;
    weight(8) =  0.25358833328369;
    weight(9) =  0.18563521442425;
    weight(10) = 0.09457905488370;
    weight(11) = 0.01010101010101;

  elseif ( order == 12 )

    xtab(1)  = -1.00000000000000;
    xtab(2)  = -0.95949297361450;
    xtab(3)  = -0.84125353283118;
    xtab(4)  = -0.65486073394528;
    xtab(5)  = -0.41541501300189;
    xtab(6)  = -0.14231483827329;
    xtab(7)  =  0.14231483827329;
    xtab(8)  =  0.41541501300189;
    xtab(9)  =  0.65486073394529;
    xtab(10) =  0.84125353283118;
    xtab(11) =  0.95949297361450;
    xtab(12) =  1.00000000000000;

    weight(1)  = 0.00826446280992;
    weight(2)  = 0.07856015374620;
    weight(3)  = 0.15504045508256;
    weight(4)  = 0.21556254600087;
    weight(5)  = 0.25991734106692;
    weight(6)  = 0.28265504129354;
    weight(7)  = 0.28265504129354;
    weight(8)  = 0.25991734106692;
    weight(9)  = 0.21556254600087;
    weight(10) = 0.15504045508256;
    weight(11) = 0.07856015374620;
    weight(12) = 0.00826446280992;

  elseif ( order == 13 )

    xtab(1)  = -1.00000000000000;
    xtab(2)  = -0.96592582628907;
    xtab(3)  = -0.86602540378444;
    xtab(4)  = -0.70710678118655;
    xtab(5)  = -0.50000000000000;
    xtab(6)  = -0.25881904510252;
    xtab(7)  =  0.00000000000000;
    xtab(8)  =  0.25881904510252;
    xtab(9)  =  0.50000000000000;
    xtab(10) =  0.70710678118655;
    xtab(11) =  0.86602540378444;
    xtab(12) =  0.96592582628907;
    xtab(13) =  1.00000000000000;

    weight(1)  = 0.00699300699301;
    weight(2)  = 0.06605742495207;
    weight(3)  = 0.13154253154253;
    weight(4)  = 0.18476338476338;
    weight(5)  = 0.22697302697303;
    weight(6)  = 0.25267569378104;
    weight(7)  = 0.26198986198986;
    weight(8)  = 0.25267569378104;
    weight(9)  = 0.22697302697303;
    weight(10) = 0.18476338476338;
    weight(11) = 0.13154253154253;
    weight(12) = 0.06605742495207;
    weight(13) = 0.00699300699301;

  elseif ( order == 14 )

    xtab(1)  = -1.00000000000000;
    xtab(2)  = -0.97094181742605;
    xtab(3)  = -0.88545602565321;
    xtab(4)  = -0.74851074817110;
    xtab(5)  = -0.56806474673116;
    xtab(6)  = -0.35460488704254;
    xtab(7)  = -0.12053668025532;
    xtab(8)  =  0.12053668025532;
    xtab(9)  =  0.35460488704254;
    xtab(10) =  0.56806474673116;
    xtab(11) =  0.74851074817110;
    xtab(12) =  0.88545602565321;
    xtab(13) =  0.97094181742605;
    xtab(14) =  1.00000000000000;

    weight(1)  = 0.00591715976331;
    weight(2)  = 0.05646531376341;
    weight(3)  = 0.11276867248986;
    weight(4)  = 0.16003802611672;
    weight(5)  = 0.19899241036578;
    weight(6)  = 0.22590304977856;
    weight(7)  = 0.23991536772235;
    weight(8)  = 0.23991536772235;
    weight(9)  = 0.22590304977856;
    weight(10) = 0.19899241036578;
    weight(11) = 0.16003802611672;
    weight(12) = 0.11276867248986;
    weight(13) = 0.05646531376341;
    weight(14) = 0.00591715976331;

  elseif ( order == 15 )

    xtab(1)  = -1.00000000000000;
    xtab(2)  = -0.97492791218182;
    xtab(3)  = -0.90096886790242;
    xtab(4)  = -0.78183148246803;
    xtab(5)  = -0.62348980185873;
    xtab(6)  = -0.43388373911756;
    xtab(7)  = -0.22252093395631;
    xtab(8)  =  0.00000000000000;
    xtab(9)  =  0.22252093395631;
    xtab(10) =  0.43388373911756;
    xtab(11) =  0.62348980185873;
    xtab(12) =  0.78183148246803;
    xtab(13) =  0.90096886790242;
    xtab(14) =  0.97492791218182;
    xtab(15) =  1.00000000000000;

    weight(1)  = 0.00512820512821;
    weight(2)  = 0.04869938729509;
    weight(3)  = 0.09782039167605;
    weight(4)  = 0.13966507849560;
    weight(5)  = 0.17560578900107;
    weight(6)  = 0.20205146748238;
    weight(7)  = 0.21888151163057;
    weight(8)  = 0.22429633858205;
    weight(9)  = 0.21888151163057;
    weight(10) = 0.20205146748238;
    weight(11) = 0.17560578900107;
    weight(12) = 0.13966507849560;
    weight(13) = 0.09782039167605;
    weight(14) = 0.04869938729509;
    weight(15) = 0.00512820512821;

  elseif ( order == 16 )

    xtab(1)  = -1.00000000000000;
    xtab(2)  = -0.97814760073381;
    xtab(3)  = -0.91354545764260;
    xtab(4)  = -0.80901699437495;
    xtab(5)  = -0.66913060635886;
    xtab(6)  = -0.50000000000000;
    xtab(7)  = -0.30901699437495;
    xtab(8)  = -0.10452846326765;
    xtab(9)  =  0.10452846326765;
    xtab(10) =  0.30901699437495;
    xtab(11) =  0.50000000000000;
    xtab(12) =  0.66913060635886;
    xtab(13) =  0.80901699437495;
    xtab(14) =  0.91354545764260;
    xtab(15) =  0.97814760073381;
    xtab(16) =  1.00000000000000;

    weight(1)  = 0.00444444444444;
    weight(2)  = 0.04251476624753;
    weight(3)  = 0.08553884025933;
    weight(4)  = 0.12294010082849;
    weight(5)  = 0.15573317603967;
    weight(6)  = 0.18132978132978;
    weight(7)  = 0.19921478132639;
    weight(8)  = 0.20828410952436;
    weight(9)  = 0.20828410952436;
    weight(10) = 0.19921478132639;
    weight(11) = 0.18132978132978;
    weight(12) = 0.15573317603967;
    weight(13) = 0.12294010082849;
    weight(14) = 0.08553884025933;
    weight(15) = 0.04251476624753;
    weight(16) = 0.00444444444444;

  elseif ( order == 17 )

    xtab(1) = -1.00000000000000;
    xtab(2) = -0.98078528040323;
    xtab(3) = -0.92387953251129;
    xtab(4) = -0.83146961230255;
    xtab(5) = -0.70710678118655;
    xtab(6) = -0.55557023301960;
    xtab(7) = -0.38268343236509;
    xtab(8) = -0.19509032201613;
    xtab(9) =  0.00000000000000;
    xtab(10) =  0.19509032201613;
    xtab(11) =  0.38268343236509;
    xtab(12) =  0.55557023301960;
    xtab(13) =  0.70710678118655;
    xtab(14) =  0.83146961230255;
    xtab(15) =  0.92387953251129;
    xtab(16) =  0.98078528040323;
    xtab(17) =  1.00000000000000;

    weight(1) =  0.00392156862745;
    weight(2) =  0.03736870283721;
    weight(3) =  0.07548233154315;
    weight(4) =  0.10890555258189;
    weight(5) =  0.13895646836823;
    weight(6) =  0.16317266428170;
    weight(7) =  0.18147378423649;
    weight(8) =  0.19251386461293;
    weight(9) =  0.19641012582189;
    weight(10) =  0.19251386461293;
    weight(11) =  0.18147378423649;
    weight(12) =  0.16317266428170;
    weight(13) =  0.13895646836823;
    weight(14) =  0.10890555258189;
    weight(15) =  0.07548233154315;
    weight(16) =  0.03736870283721;
    weight(17) =  0.00392156862745;

  elseif ( order == 33 )

    xtab(1) = -1.00000000000000;
    xtab(2) = -0.99518472667220;
    xtab(3) = -0.98078528040323;
    xtab(4) = -0.95694033573221;
    xtab(5) = -0.92387953251129;
    xtab(6) = -0.88192126434835;
    xtab(7) = -0.83146961230255;
    xtab(8) = -0.77301045336274;
    xtab(9) = -0.70710678118655;
    xtab(10) = -0.63439328416365;
    xtab(11) = -0.55557023301960;
    xtab(12) = -0.47139673682600;
    xtab(13) = -0.38268343236509;
    xtab(14) = -0.29028467725446;
    xtab(15) = -0.19509032201613;
    xtab(16) = -0.09801714032956;
    xtab(17) =  0.00000000000000;
    xtab(18) =  0.09801714032956;
    xtab(19) =  0.19509032201613;
    xtab(20) =  0.29028467725446;
    xtab(21) =  0.38268343236509;
    xtab(22) =  0.47139673682600;
    xtab(23) =  0.55557023301960;
    xtab(24) =  0.63439328416365;
    xtab(25) =  0.70710678118655;
    xtab(26) =  0.77301045336274;
    xtab(27) =  0.83146961230255;
    xtab(28) =  0.88192126434836;
    xtab(29) =  0.92387953251129;
    xtab(30) =  0.95694033573221;
    xtab(31) =  0.98078528040323;
    xtab(32) =  0.99518472667220;
    xtab(33) =  1.00000000000000;

    weight(1) =  0.00097751710655;
    weight(2) =  0.00939319796296;
    weight(3) =  0.01923424513268;
    weight(4) =  0.02845791667723;
    weight(5) =  0.03759434191405;
    weight(6) =  0.04626276283775;
    weight(7) =  0.05455501630398;
    weight(8) =  0.06227210954529;
    weight(9) =  0.06942757563044;
    weight(10) =  0.07588380044139;
    weight(11) =  0.08163481765494;
    weight(12) =  0.08657753844183;
    weight(13) =  0.09070611286772;
    weight(14) =  0.09394324443877;
    weight(15) =  0.09629232594549;
    weight(16) =  0.09769818820806;
    weight(17) =  0.09817857778177;
    weight(18) =  0.09769818820806;
    weight(19) =  0.09629232594549;
    weight(20) =  0.09394324443877;
    weight(21) =  0.09070611286772;
    weight(22) =  0.08657753844183;
    weight(23) =  0.08163481765494;
    weight(24) =  0.07588380044139;
    weight(25) =  0.06942757563044;
    weight(26) =  0.06227210954529;
    weight(27) =  0.05455501630398;
    weight(28) =  0.04626276283775;
    weight(29) =  0.03759434191405;
    weight(30) =  0.02845791667723;
    weight(31) =  0.01923424513268;
    weight(32) =  0.00939319796296;
    weight(33) =  0.00097751710655;

  elseif ( order == 65 )

    xtab(1) = -1.00000000000000;
    xtab(2) = -0.99879545620517;
    xtab(3) = -0.99518472667220;
    xtab(4) = -0.98917650996478;
    xtab(5) = -0.98078528040323;
    xtab(6) = -0.97003125319454;
    xtab(7) = -0.95694033573221;
    xtab(8) = -0.94154406518302;
    xtab(9) = -0.92387953251129;
    xtab(10) = -0.90398929312344;
    xtab(11) = -0.88192126434835;
    xtab(12) = -0.85772861000027;
    xtab(13) = -0.83146961230255;
    xtab(14) = -0.80320753148064;
    xtab(15) = -0.77301045336274;
    xtab(16) = -0.74095112535496;
    xtab(17) = -0.70710678118655;
    xtab(18) = -0.67155895484702;
    xtab(19) = -0.63439328416365;
    xtab(20) = -0.59569930449243;
    xtab(21) = -0.55557023301960;
    xtab(22) = -0.51410274419322;
    xtab(23) = -0.47139673682600;
    xtab(24) = -0.42755509343028;
    xtab(25) = -0.38268343236509;
    xtab(26) = -0.33688985339222;
    xtab(27) = -0.29028467725446;
    xtab(28) = -0.24298017990326;
    xtab(29) = -0.19509032201613;
    xtab(30) = -0.14673047445536;
    xtab(31) = -0.09801714032956;
    xtab(32) = -0.04906767432742;
    xtab(33) =  0.00000000000000;
    xtab(34) =  0.04906767432742;
    xtab(35) =  0.09801714032956;
    xtab(36) =  0.14673047445536;
    xtab(37) =  0.19509032201613;
    xtab(38) =  0.24298017990326;
    xtab(39) =  0.29028467725446;
    xtab(40) =  0.33688985339222;
    xtab(41) =  0.38268343236509;
    xtab(42) =  0.42755509343028;
    xtab(43) =  0.47139673682600;
    xtab(44) =  0.51410274419322;
    xtab(45) =  0.55557023301960;
    xtab(46) =  0.59569930449243;
    xtab(47) =  0.63439328416365;
    xtab(48) =  0.67155895484702;
    xtab(49) =  0.70710678118655;
    xtab(50) =  0.74095112535496;
    xtab(51) =  0.77301045336274;
    xtab(52) =  0.80320753148064;
    xtab(53) =  0.83146961230255;
    xtab(54) =  0.85772861000027;
    xtab(55) =  0.88192126434836;
    xtab(56) =  0.90398929312344;
    xtab(57) =  0.92387953251129;
    xtab(58) =  0.94154406518302;
    xtab(59) =  0.95694033573221;
    xtab(60) =  0.97003125319454;
    xtab(61) =  0.98078528040323;
    xtab(62) =  0.98917650996478;
    xtab(63) =  0.99518472667220;
    xtab(64) =  0.99879545620517;
    xtab(65) =  1.00000000000000;

    weight(1) =  0.00024420024420;
    weight(2) =  0.00235149067531;
    weight(3) =  0.00483146544879;
    weight(4) =  0.00719269316174;
    weight(5) =  0.00958233879528;
    weight(6) =  0.01192339471421;
    weight(7) =  0.01425206043235;
    weight(8) =  0.01653498765729;
    weight(9) =  0.01878652974180;
    weight(10) =  0.02098627442974;
    weight(11) =  0.02314069493436;
    weight(12) =  0.02523506498175;
    weight(13) =  0.02727225714147;
    weight(14) =  0.02924065319747;
    weight(15) =  0.03114129710407;
    weight(16) =  0.03296454656998;
    weight(17) =  0.03471049818093;
    weight(18) =  0.03637092028664;
    weight(19) =  0.03794545992128;
    weight(20) =  0.03942698871296;
    weight(21) =  0.04081501340036;
    weight(22) =  0.04210333111142;
    weight(23) =  0.04329151496169;
    weight(24) =  0.04437417923926;
    weight(25) =  0.04535110955166;
    weight(26) =  0.04621766751093;
    weight(27) =  0.04697395904661;
    weight(28) =  0.04761604458525;
    weight(29) =  0.04814443257251;
    weight(30) =  0.04855584485714;
    weight(31) =  0.04885125664307;
    weight(32) =  0.04902801843103;
    weight(33) =  0.04908762351494;
    weight(34) =  0.04902801843103;
    weight(35) =  0.04885125664307;
    weight(36) =  0.04855584485714;
    weight(37) =  0.04814443257251;
    weight(38) =  0.04761604458525;
    weight(39) =  0.04697395904661;
    weight(40) =  0.04621766751093;
    weight(41) =  0.04535110955166;
    weight(42) =  0.04437417923926;
    weight(43) =  0.04329151496169;
    weight(44) =  0.04210333111142;
    weight(45) =  0.04081501340036;
    weight(46) =  0.03942698871296;
    weight(47) =  0.03794545992128;
    weight(48) =  0.03637092028664;
    weight(49) =  0.03471049818093;
    weight(50) =  0.03296454656998;
    weight(51) =  0.03114129710407;
    weight(52) =  0.02924065319747;
    weight(53) =  0.02727225714147;
    weight(54) =  0.02523506498175;
    weight(55) =  0.02314069493436;
    weight(56) =  0.02098627442974;
    weight(57) =  0.01878652974180;
    weight(58) =  0.01653498765729;
    weight(59) =  0.01425206043235;
    weight(60) =  0.01192339471421;
    weight(61) =  0.00958233879528;
    weight(62) =  0.00719269316174;
    weight(63) =  0.00483146544879;
    weight(64) =  0.00235149067531;
    weight(65) =  0.00024420024420;

  elseif ( order == 129 )

    xtab(1) = -1.00000000000000;
    xtab(2) = -0.99969881869620;
    xtab(3) = -0.99879545620517;
    xtab(4) = -0.99729045667869;
    xtab(5) = -0.99518472667220;
    xtab(6) = -0.99247953459871;
    xtab(7) = -0.98917650996478;
    xtab(8) = -0.98527764238894;
    xtab(9) = -0.98078528040323;
    xtab(10) = -0.97570213003853;
    xtab(11) = -0.97003125319454;
    xtab(12) = -0.96377606579544;
    xtab(13) = -0.95694033573221;
    xtab(14) = -0.94952818059304;
    xtab(15) = -0.94154406518302;
    xtab(16) = -0.93299279883474;
    xtab(17) = -0.92387953251129;
    xtab(18) = -0.91420975570353;
    xtab(19) = -0.90398929312344;
    xtab(20) = -0.89322430119552;
    xtab(21) = -0.88192126434835;
    xtab(22) = -0.87008699110871;
    xtab(23) = -0.85772861000027;
    xtab(24) = -0.84485356524971;
    xtab(25) = -0.83146961230255;
    xtab(26) = -0.81758481315158;
    xtab(27) = -0.80320753148064;
    xtab(28) = -0.78834642762661;
    xtab(29) = -0.77301045336274;
    xtab(30) = -0.75720884650648;
    xtab(31) = -0.74095112535496;
    xtab(32) = -0.72424708295147;
    xtab(33) = -0.70710678118655;
    xtab(34) = -0.68954054473707;
    xtab(35) = -0.67155895484702;
    xtab(36) = -0.65317284295378;
    xtab(37) = -0.63439328416365;
    xtab(38) = -0.61523159058063;
    xtab(39) = -0.59569930449243;
    xtab(40) = -0.57580819141785;
    xtab(41) = -0.55557023301960;
    xtab(42) = -0.53499761988710;
    xtab(43) = -0.51410274419322;
    xtab(44) = -0.49289819222978;
    xtab(45) = -0.47139673682600;
    xtab(46) = -0.44961132965461;
    xtab(47) = -0.42755509343028;
    xtab(48) = -0.40524131400499;
    xtab(49) = -0.38268343236509;
    xtab(50) = -0.35989503653499;
    xtab(51) = -0.33688985339222;
    xtab(52) = -0.31368174039889;
    xtab(53) = -0.29028467725446;
    xtab(54) = -0.26671275747490;
    xtab(55) = -0.24298017990326;
    xtab(56) = -0.21910124015687;
    xtab(57) = -0.19509032201613;
    xtab(58) = -0.17096188876030;
    xtab(59) = -0.14673047445536;
    xtab(60) = -0.12241067519922;
    xtab(61) = -0.09801714032956;
    xtab(62) = -0.07356456359967;
    xtab(63) = -0.04906767432742;
    xtab(64) = -0.02454122852291;
    xtab(65) =  0.00000000000000;
    xtab(66) =  0.02454122852291;
    xtab(67) =  0.04906767432742;
    xtab(68) =  0.07356456359967;
    xtab(69) =  0.09801714032956;
    xtab(70) =  0.12241067519922;
    xtab(71) =  0.14673047445536;
    xtab(72) =  0.17096188876030;
    xtab(73) =  0.19509032201613;
    xtab(74) =  0.21910124015687;
    xtab(75) =  0.24298017990326;
    xtab(76) =  0.26671275747490;
    xtab(77) =  0.29028467725446;
    xtab(78) =  0.31368174039889;
    xtab(79) =  0.33688985339222;
    xtab(80) =  0.35989503653499;
    xtab(81) =  0.38268343236509;
    xtab(82) =  0.40524131400499;
    xtab(83) =  0.42755509343028;
    xtab(84) =  0.44961132965461;
    xtab(85) =  0.47139673682600;
    xtab(86) =  0.49289819222978;
    xtab(87) =  0.51410274419322;
    xtab(88) =  0.53499761988710;
    xtab(89) =  0.55557023301960;
    xtab(90) =  0.57580819141785;
    xtab(91) =  0.59569930449243;
    xtab(92) =  0.61523159058063;
    xtab(93) =  0.63439328416365;
    xtab(94) =  0.65317284295378;
    xtab(95) =  0.67155895484702;
    xtab(96) =  0.68954054473707;
    xtab(97) =  0.70710678118655;
    xtab(98) =  0.72424708295147;
    xtab(99) =  0.74095112535496;
    xtab(100) =  0.75720884650648;
    xtab(101) =  0.77301045336274;
    xtab(102) =  0.78834642762661;
    xtab(103) =  0.80320753148064;
    xtab(104) =  0.81758481315158;
    xtab(105) =  0.83146961230255;
    xtab(106) =  0.84485356524971;
    xtab(107) =  0.85772861000027;
    xtab(108) =  0.87008699110871;
    xtab(109) =  0.88192126434836;
    xtab(110) =  0.89322430119552;
    xtab(111) =  0.90398929312344;
    xtab(112) =  0.91420975570353;
    xtab(113) =  0.92387953251129;
    xtab(114) =  0.93299279883474;
    xtab(115) =  0.94154406518302;
    xtab(116) =  0.94952818059304;
    xtab(117) =  0.95694033573221;
    xtab(118) =  0.96377606579544;
    xtab(119) =  0.97003125319454;
    xtab(120) =  0.97570213003853;
    xtab(121) =  0.98078528040323;
    xtab(122) =  0.98527764238894;
    xtab(123) =  0.98917650996478;
    xtab(124) =  0.99247953459871;
    xtab(125) =  0.99518472667220;
    xtab(126) =  0.99729045667869;
    xtab(127) =  0.99879545620517;
    xtab(128) =  0.99969881869620;
    xtab(129) =  1.00000000000000;

    weight(1) =  0.00006103888177;
    weight(2) =  0.00058807215383;
    weight(3) =  0.00120930061875;
    weight(4) =  0.00180308126695;
    weight(5) =  0.00240715327877;
    weight(6) =  0.00300345869904;
    weight(7) =  0.00360197835813;
    weight(8) =  0.00419553798719;
    weight(9) =  0.00478862143341;
    weight(10) =  0.00537724746840;
    weight(11) =  0.00596388034731;
    weight(12) =  0.00654590843862;
    weight(13) =  0.00712483332325;
    weight(14) =  0.00769875778896;
    weight(15) =  0.00826865154203;
    weight(16) =  0.00883303867470;
    weight(17) =  0.00939256583935;
    weight(18) =  0.00994602784923;
    weight(19) =  0.01049386202577;
    weight(20) =  0.01103504877427;
    weight(21) =  0.01156988348291;
    weight(22) =  0.01209748052807;
    weight(23) =  0.01261803597978;
    weight(24) =  0.01313076516694;
    weight(25) =  0.01363579321294;
    weight(26) =  0.01413241437853;
    weight(27) =  0.01462070254634;
    weight(28) =  0.01510001572479;
    weight(29) =  0.01557039073899;
    weight(30) =  0.01603123858745;
    weight(31) =  0.01648256956220;
    weight(32) =  0.01692383985846;
    weight(33) =  0.01735504125411;
    weight(34) =  0.01777566938875;
    weight(35) =  0.01818570377926;
    weight(36) =  0.01858467519567;
    weight(37) =  0.01897255587068;
    weight(38) =  0.01934890842392;
    weight(39) =  0.01971370183700;
    weight(40) =  0.02006652805198;
    weight(41) =  0.02040735612004;
    weight(42) =  0.02073580533490;
    weight(43) =  0.02105184759002;
    weight(44) =  0.02135512797426;
    weight(45) =  0.02164562356713;
    weight(46) =  0.02192300400599;
    weight(47) =  0.02218725355897;
    weight(48) =  0.02243806539723;
    weight(49) =  0.02267543270457;
    weight(50) =  0.02289907134391;
    weight(51) =  0.02310898491627;
    weight(52) =  0.02330491126131;
    weight(53) =  0.02348686571193;
    weight(54) =  0.02365460746058;
    weight(55) =  0.02380816473024;
    weight(56) =  0.02394731750477;
    weight(57) =  0.02407210792328;
    weight(58) =  0.02418233623893;
    weight(59) =  0.02427805942076;
    weight(60) =  0.02435909748928;
    weight(61) =  0.02442552306157;
    weight(62) =  0.02447717542743;
    weight(63) =  0.02451414358882;
    weight(64) =  0.02453628559651;
    weight(65) =  0.02454370750551;
    weight(66) =  0.02453628559651;
    weight(67) =  0.02451414358882;
    weight(68) =  0.02447717542743;
    weight(69) =  0.02442552306157;
    weight(70) =  0.02435909748928;
    weight(71) =  0.02427805942076;
    weight(72) =  0.02418233623893;
    weight(73) =  0.02407210792328;
    weight(74) =  0.02394731750477;
    weight(75) =  0.02380816473024;
    weight(76) =  0.02365460746058;
    weight(77) =  0.02348686571193;
    weight(78) =  0.02330491126131;
    weight(79) =  0.02310898491627;
    weight(80) =  0.02289907134391;
    weight(81) =  0.02267543270457;
    weight(82) =  0.02243806539723;
    weight(83) =  0.02218725355897;
    weight(84) =  0.02192300400599;
    weight(85) =  0.02164562356713;
    weight(86) =  0.02135512797426;
    weight(87) =  0.02105184759002;
    weight(88) =  0.02073580533490;
    weight(89) =  0.02040735612004;
    weight(90) =  0.02006652805198;
    weight(91) =  0.01971370183700;
    weight(92) =  0.01934890842392;
    weight(93) =  0.01897255587068;
    weight(94) =  0.01858467519567;
    weight(95) =  0.01818570377926;
    weight(96) =  0.01777566938875;
    weight(97) =  0.01735504125411;
    weight(98) =  0.01692383985846;
    weight(99) =  0.01648256956220;
    weight(100) =  0.01603123858745;
    weight(101) =  0.01557039073899;
    weight(102) =  0.01510001572479;
    weight(103) =  0.01462070254634;
    weight(104) =  0.01413241437853;
    weight(105) =  0.01363579321294;
    weight(106) =  0.01313076516694;
    weight(107) =  0.01261803597978;
    weight(108) =  0.01209748052807;
    weight(109) =  0.01156988348291;
    weight(110) =  0.01103504877427;
    weight(111) =  0.01049386202577;
    weight(112) =  0.00994602784923;
    weight(113) =  0.00939256583935;
    weight(114) =  0.00883303867470;
    weight(115) =  0.00826865154203;
    weight(116) =  0.00769875778896;
    weight(117) =  0.00712483332325;
    weight(118) =  0.00654590843862;
    weight(119) =  0.00596388034731;
    weight(120) =  0.00537724746840;
    weight(121) =  0.00478862143341;
    weight(122) =  0.00419553798719;
    weight(123) =  0.00360197835813;
    weight(124) =  0.00300345869904;
    weight(125) =  0.00240715327877;
    weight(126) =  0.00180308126695;
    weight(127) =  0.00120930061875;
    weight(128) =  0.00058807215383;
    weight(129) =  0.00006103888177;

  else

    fprintf ( 1, '\n' );
    fprintf ( 1, 'CLENSHAW_CURTIS_SET - Fatal error!\n' );
    fprintf ( 1, '  Illegal value of ORDER = %d\n', order );
    fprintf ( 1, '  Legal values are 1 to 17, 33, 65 or 129.\n' );
    error ( 'CLENSHAW_CURTIS_SET - Fatal error!' );

  end

  return
end
