function [ xtab, weight ] = gauss_legendre_rule_set ( order )

%*****************************************************************************80
%
%% GAUSS_LEGENDRE_RULE_SET sets a Gauss-Legendre quadrature rule.
%
%  Discussion:
%
%    The integration interval is [ -1, 1 ].
%
%    The weight function w(x) = 1.0;
%
%    The integral to approximate:
%
%      Integral ( -1 <= X <= 1 ) F(X) dX
%
%    Quadrature rule:
%
%      Sum ( 1 <= I <= ORDER ) WEIGHT(I) * F ( XTAB(I) )
%
%    The quadrature rule will integrate exactly all polynomials up to
%    X**(2*ORDER-1).
%
%    The abscissas of the rule are the zeroes of the Legendre polynomial
%    P(ORDER)(X).
%
%    The integral produced by a Gauss-Legendre rule is equal to the
%    integral of the unique polynomial of degree ORDER-1 which
%    agrees with the function at the ORDER abscissas of the rule.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    26 April 2006
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Milton Abramowitz, Irene Stegun,
%    Handbook of Mathematical Functions,
%    National Bureau of Standards, 1964.
%
%    Vladimir Krylov,
%    Approximate Calculation of Integrals,
%    MacMillan, 1962.
%
%    Arthur Stroud and Don Secrest,
%    Gaussian Quadrature Formulas,
%    Prentice Hall, 1966.
%
%    Daniel Zwillinger, editor,
%    Standard Mathematical Tables and Formulae,
%    30th Edition,
%    CRC Press, 1996.
%
%  Parameters:
%
%    Input, integer ORDER, the order of the rule.
%    ORDER must be between 1 and 32 and 64.
%
%    Output, real XTAB(ORDER), the abscissas of the rule.
%
%    Output, real WEIGHT(ORDER), the weights of the rule.
%    The weights are positive, symmetric and should sum to 2.
%
  if ( order == 1 )

    xtab(1) =   0.0;

    weight(1) = 2.0;

  elseif ( order == 2 )

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

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

  elseif ( order == 3 )

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

    weight(1) = 5.0 / 9.0;
    weight(2) = 8.0 / 9.0;
    weight(3) = 5.0 / 9.0;

  elseif ( order == 4 )

    xtab(1) = - 0.861136311594052575223946488893;
    xtab(2) = - 0.339981043584856264802665759103;
    xtab(3) =   0.339981043584856264802665759103;
    xtab(4) =   0.861136311594052575223946488893;

    weight(1) = 0.347854845137453857373063949222;
    weight(2) = 0.652145154862546142626936050778;
    weight(3) = 0.652145154862546142626936050778;
    weight(4) = 0.347854845137453857373063949222;

  elseif ( order == 5 )

    xtab(1) = - 0.906179845938663992797626878299;
    xtab(2) = - 0.538469310105683091036314420700;
    xtab(3) =   0.0;
    xtab(4) =   0.538469310105683091036314420700;
    xtab(5) =   0.906179845938663992797626878299;

    weight(1) = 0.236926885056189087514264040720;
    weight(2) = 0.478628670499366468041291514836;
    weight(3) = 0.568888888888888888888888888889;
    weight(4) = 0.478628670499366468041291514836;
    weight(5) = 0.236926885056189087514264040720;

  elseif ( order == 6 )

    xtab(1) = - 0.932469514203152027812301554494;
    xtab(2) = - 0.661209386466264513661399595020;
    xtab(3) = - 0.238619186083196908630501721681;
    xtab(4) =   0.238619186083196908630501721681;
    xtab(5) =   0.661209386466264513661399595020;
    xtab(6) =   0.932469514203152027812301554494;

    weight(1) = 0.171324492379170345040296142173;
    weight(2) = 0.360761573048138607569833513838;
    weight(3) = 0.467913934572691047389870343990;
    weight(4) = 0.467913934572691047389870343990;
    weight(5) = 0.360761573048138607569833513838;
    weight(6) = 0.171324492379170345040296142173;

  elseif ( order == 7 )

    xtab(1) = - 0.949107912342758524526189684048;
    xtab(2) = - 0.741531185599394439863864773281;
    xtab(3) = - 0.405845151377397166906606412077;
    xtab(4) =   0.0;
    xtab(5) =   0.405845151377397166906606412077;
    xtab(6) =   0.741531185599394439863864773281;
    xtab(7) =   0.949107912342758524526189684048;

    weight(1) = 0.129484966168869693270611432679;
    weight(2) = 0.279705391489276667901467771424;
    weight(3) = 0.381830050505118944950369775489;
    weight(4) = 0.417959183673469387755102040816;
    weight(5) = 0.381830050505118944950369775489;
    weight(6) = 0.279705391489276667901467771424;
    weight(7) = 0.129484966168869693270611432679;

  elseif ( order == 8 )

    xtab(1) = - 0.960289856497536231683560868569;
    xtab(2) = - 0.796666477413626739591553936476;
    xtab(3) = - 0.525532409916328985817739049189;
    xtab(4) = - 0.183434642495649804939476142360;
    xtab(5) =   0.183434642495649804939476142360;
    xtab(6) =   0.525532409916328985817739049189;
    xtab(7) =   0.796666477413626739591553936476;
    xtab(8) =   0.960289856497536231683560868569;

    weight(1) = 0.101228536290376259152531354310;
    weight(2) = 0.222381034453374470544355994426;
    weight(3) = 0.313706645877887287337962201987;
    weight(4) = 0.362683783378361982965150449277;
    weight(5) = 0.362683783378361982965150449277;
    weight(6) = 0.313706645877887287337962201987;
    weight(7) = 0.222381034453374470544355994426;
    weight(8) = 0.101228536290376259152531354310;

  elseif ( order == 9 )

    xtab(1) = - 0.968160239507626089835576202904;
    xtab(2) = - 0.836031107326635794299429788070;
    xtab(3) = - 0.613371432700590397308702039341;
    xtab(4) = - 0.324253423403808929038538014643;
    xtab(5) =   0.0;
    xtab(6) =   0.324253423403808929038538014643;
    xtab(7) =   0.613371432700590397308702039341;
    xtab(8) =   0.836031107326635794299429788070;
    xtab(9) =   0.968160239507626089835576202904;

    weight(1) = 0.812743883615744119718921581105E-01;
    weight(2) = 0.180648160694857404058472031243;
    weight(3) = 0.260610696402935462318742869419;
    weight(4) = 0.312347077040002840068630406584;
    weight(5) = 0.330239355001259763164525069287;
    weight(6) = 0.312347077040002840068630406584;
    weight(7) = 0.260610696402935462318742869419;
    weight(8) = 0.180648160694857404058472031243;
    weight(9) = 0.812743883615744119718921581105E-01;

  elseif ( order == 10 )

    xtab(1) =  - 0.973906528517171720077964012084;
    xtab(2) =  - 0.865063366688984510732096688423;
    xtab(3) =  - 0.679409568299024406234327365115;
    xtab(4) =  - 0.433395394129247190799265943166;
    xtab(5) =  - 0.148874338981631210884826001130;
    xtab(6) =    0.148874338981631210884826001130;
    xtab(7) =    0.433395394129247190799265943166;
    xtab(8) =    0.679409568299024406234327365115;
    xtab(9) =    0.865063366688984510732096688423;
    xtab(10) =   0.973906528517171720077964012084;

    weight(1) =  0.666713443086881375935688098933E-01;
    weight(2) =  0.149451349150580593145776339658;
    weight(3) =  0.219086362515982043995534934228;
    weight(4) =  0.269266719309996355091226921569;
    weight(5) =  0.295524224714752870173892994651;
    weight(6) =  0.295524224714752870173892994651;
    weight(7) =  0.269266719309996355091226921569;
    weight(8) =  0.219086362515982043995534934228;
    weight(9) =  0.149451349150580593145776339658;
    weight(10) = 0.666713443086881375935688098933E-01;

  elseif ( order == 11 )

    xtab(1) =  - 0.978228658146056992803938001123;
    xtab(2) =  - 0.887062599768095299075157769304;
    xtab(3) =  - 0.730152005574049324093416252031;
    xtab(4) =  - 0.519096129206811815925725669459;
    xtab(5) =  - 0.269543155952344972331531985401;
    xtab(6) =    0.0;
    xtab(7) =    0.269543155952344972331531985401;
    xtab(8) =    0.519096129206811815925725669459;
    xtab(9) =    0.730152005574049324093416252031;
    xtab(10) =   0.887062599768095299075157769304;
    xtab(11) =   0.978228658146056992803938001123;

    weight(1) =  0.556685671161736664827537204425E-01;
    weight(2) =  0.125580369464904624634694299224;
    weight(3) =  0.186290210927734251426097641432;
    weight(4) =  0.233193764591990479918523704843;
    weight(5) =  0.262804544510246662180688869891;
    weight(6) =  0.272925086777900630714483528336;
    weight(7) =  0.262804544510246662180688869891;
    weight(8) =  0.233193764591990479918523704843;
    weight(9) =  0.186290210927734251426097641432;
    weight(10) = 0.125580369464904624634694299224;
    weight(11) = 0.556685671161736664827537204425E-01;

  elseif ( order == 12 )

    xtab(1) =  - 0.981560634246719250690549090149;
    xtab(2) =  - 0.904117256370474856678465866119;
    xtab(3) =  - 0.769902674194304687036893833213;
    xtab(4) =  - 0.587317954286617447296702418941;
    xtab(5) =  - 0.367831498998180193752691536644;
    xtab(6) =  - 0.125233408511468915472441369464;
    xtab(7) =    0.125233408511468915472441369464;
    xtab(8) =    0.367831498998180193752691536644;
    xtab(9) =    0.587317954286617447296702418941;
    xtab(10) =   0.769902674194304687036893833213;
    xtab(11) =   0.904117256370474856678465866119;
    xtab(12) =   0.981560634246719250690549090149;

    weight(1) =  0.471753363865118271946159614850E-01;
    weight(2) =  0.106939325995318430960254718194;
    weight(3) =  0.160078328543346226334652529543;
    weight(4) =  0.203167426723065921749064455810;
    weight(5) =  0.233492536538354808760849898925;
    weight(6) =  0.249147045813402785000562436043;
    weight(7) =  0.249147045813402785000562436043;
    weight(8) =  0.233492536538354808760849898925;
    weight(9) =  0.203167426723065921749064455810;
    weight(10) = 0.160078328543346226334652529543;
    weight(11) = 0.106939325995318430960254718194;
    weight(12) = 0.471753363865118271946159614850E-01;

  elseif ( order == 13 )

    xtab(1) =  - 0.984183054718588149472829448807;
    xtab(2) =  - 0.917598399222977965206547836501;
    xtab(3) =  - 0.801578090733309912794206489583;
    xtab(4) =  - 0.642349339440340220643984606996;
    xtab(5) =  - 0.448492751036446852877912852128;
    xtab(6) =  - 0.230458315955134794065528121098;
    xtab(7) =    0.0;
    xtab(8) =    0.230458315955134794065528121098;
    xtab(9) =    0.448492751036446852877912852128;
    xtab(10) =   0.642349339440340220643984606996;
    xtab(11) =   0.801578090733309912794206489583;
    xtab(12) =   0.917598399222977965206547836501;
    xtab(13) =   0.984183054718588149472829448807;

    weight(1) =  0.404840047653158795200215922010E-01;
    weight(2) =  0.921214998377284479144217759538E-01;
    weight(3) =  0.138873510219787238463601776869;
    weight(4) =  0.178145980761945738280046691996;
    weight(5) =  0.207816047536888502312523219306;
    weight(6) =  0.226283180262897238412090186040;
    weight(7) =  0.232551553230873910194589515269;
    weight(8) =  0.226283180262897238412090186040;
    weight(9) =  0.207816047536888502312523219306;
    weight(10) = 0.178145980761945738280046691996;
    weight(11) = 0.138873510219787238463601776869;
    weight(12) = 0.921214998377284479144217759538E-01;
    weight(13) = 0.404840047653158795200215922010E-01;

  elseif ( order == 14 )

    xtab(1) =  - 0.986283808696812338841597266704;
    xtab(2) =  - 0.928434883663573517336391139378;
    xtab(3) =  - 0.827201315069764993189794742650;
    xtab(4) =  - 0.687292904811685470148019803019;
    xtab(5) =  - 0.515248636358154091965290718551;
    xtab(6) =  - 0.319112368927889760435671824168;
    xtab(7) =  - 0.108054948707343662066244650220;
    xtab(8) =    0.108054948707343662066244650220;
    xtab(9) =    0.319112368927889760435671824168;
    xtab(10) =   0.515248636358154091965290718551;
    xtab(11) =   0.687292904811685470148019803019;
    xtab(12) =   0.827201315069764993189794742650;
    xtab(13) =   0.928434883663573517336391139378;
    xtab(14) =   0.986283808696812338841597266704;

    weight(1) =  0.351194603317518630318328761382E-01;
    weight(2) =  0.801580871597602098056332770629E-01;
    weight(3) =  0.121518570687903184689414809072;
    weight(4) =  0.157203167158193534569601938624;
    weight(5) =  0.185538397477937813741716590125;
    weight(6) =  0.205198463721295603965924065661;
    weight(7) =  0.215263853463157790195876443316;
    weight(8) =  0.215263853463157790195876443316;
    weight(9) =  0.205198463721295603965924065661;
    weight(10) = 0.185538397477937813741716590125;
    weight(11) = 0.157203167158193534569601938624;
    weight(12) = 0.121518570687903184689414809072;
    weight(13) = 0.801580871597602098056332770629E-01;
    weight(14) = 0.351194603317518630318328761382E-01;

  elseif ( order == 15 )

    xtab(1) =  - 0.987992518020485428489565718587;
    xtab(2) =  - 0.937273392400705904307758947710;
    xtab(3) =  - 0.848206583410427216200648320774;
    xtab(4) =  - 0.724417731360170047416186054614;
    xtab(5) =  - 0.570972172608538847537226737254;
    xtab(6) =  - 0.394151347077563369897207370981;
    xtab(7) =  - 0.201194093997434522300628303395;
    xtab(8) =    0.0;
    xtab(9) =    0.201194093997434522300628303395;
    xtab(10) =   0.394151347077563369897207370981;
    xtab(11) =   0.570972172608538847537226737254;
    xtab(12) =   0.724417731360170047416186054614;
    xtab(13) =   0.848206583410427216200648320774;
    xtab(14) =   0.937273392400705904307758947710;
    xtab(15) =   0.987992518020485428489565718587;

    weight(1) =  0.307532419961172683546283935772E-01;
    weight(2) =  0.703660474881081247092674164507E-01;
    weight(3) =  0.107159220467171935011869546686;
    weight(4) =  0.139570677926154314447804794511;
    weight(5) =  0.166269205816993933553200860481;
    weight(6) =  0.186161000015562211026800561866;
    weight(7) =  0.198431485327111576456118326444;
    weight(8) =  0.202578241925561272880620199968;
    weight(9) =  0.198431485327111576456118326444;
    weight(10) = 0.186161000015562211026800561866;
    weight(11) = 0.166269205816993933553200860481;
    weight(12) = 0.139570677926154314447804794511;
    weight(13) = 0.107159220467171935011869546686;
    weight(14) = 0.703660474881081247092674164507E-01;
    weight(15) = 0.307532419961172683546283935772E-01;

  elseif ( order == 16 )

    xtab(1) =  - 0.989400934991649932596154173450;
    xtab(2) =  - 0.944575023073232576077988415535;
    xtab(3) =  - 0.865631202387831743880467897712;
    xtab(4) =  - 0.755404408355003033895101194847;
    xtab(5) =  - 0.617876244402643748446671764049;
    xtab(6) =  - 0.458016777657227386342419442984;
    xtab(7) =  - 0.281603550779258913230460501460;
    xtab(8) =  - 0.950125098376374401853193354250E-01;
    xtab(9) =    0.950125098376374401853193354250E-01;
    xtab(10) =   0.281603550779258913230460501460;
    xtab(11) =   0.458016777657227386342419442984;
    xtab(12) =   0.617876244402643748446671764049;
    xtab(13) =   0.755404408355003033895101194847;
    xtab(14) =   0.865631202387831743880467897712;
    xtab(15) =   0.944575023073232576077988415535;
    xtab(16) =   0.989400934991649932596154173450;

    weight(1) =  0.271524594117540948517805724560E-01;
    weight(2) =  0.622535239386478928628438369944E-01;
    weight(3) =  0.951585116824927848099251076022E-01;
    weight(4) =  0.124628971255533872052476282192;
    weight(5) =  0.149595988816576732081501730547;
    weight(6) =  0.169156519395002538189312079030;
    weight(7) =  0.182603415044923588866763667969;
    weight(8) =  0.189450610455068496285396723208;
    weight(9) =  0.189450610455068496285396723208;
    weight(10) = 0.182603415044923588866763667969;
    weight(11) = 0.169156519395002538189312079030;
    weight(12) = 0.149595988816576732081501730547;
    weight(13) = 0.124628971255533872052476282192;
    weight(14) = 0.951585116824927848099251076022E-01;
    weight(15) = 0.622535239386478928628438369944E-01;
    weight(16) = 0.271524594117540948517805724560E-01;

  elseif ( order == 17 )

    xtab(1) =  - 0.990575475314417335675434019941;
    xtab(2) =  - 0.950675521768767761222716957896;
    xtab(3) =  - 0.880239153726985902122955694488;
    xtab(4) =  - 0.781514003896801406925230055520;
    xtab(5) =  - 0.657671159216690765850302216643;
    xtab(6) =  - 0.512690537086476967886246568630;
    xtab(7) =  - 0.351231763453876315297185517095;
    xtab(8) =  - 0.178484181495847855850677493654;
    xtab(9) =    0.0;
    xtab(10) =   0.178484181495847855850677493654;
    xtab(11) =   0.351231763453876315297185517095;
    xtab(12) =   0.512690537086476967886246568630;
    xtab(13) =   0.657671159216690765850302216643;
    xtab(14) =   0.781514003896801406925230055520;
    xtab(15) =   0.880239153726985902122955694488;
    xtab(16) =   0.950675521768767761222716957896;
    xtab(17) =   0.990575475314417335675434019941;

    weight(1) =  0.241483028685479319601100262876E-01;
    weight(2) =  0.554595293739872011294401653582E-01;
    weight(3) =  0.850361483171791808835353701911E-01;
    weight(4) =  0.111883847193403971094788385626;
    weight(5) =  0.135136368468525473286319981702;
    weight(6) =  0.154045761076810288081431594802;
    weight(7) =  0.168004102156450044509970663788;
    weight(8) =  0.176562705366992646325270990113;
    weight(9) =  0.179446470356206525458265644262;
    weight(10) = 0.176562705366992646325270990113;
    weight(11) = 0.168004102156450044509970663788;
    weight(12) = 0.154045761076810288081431594802;
    weight(13) = 0.135136368468525473286319981702;
    weight(14) = 0.111883847193403971094788385626;
    weight(15) = 0.850361483171791808835353701911E-01;
    weight(16) = 0.554595293739872011294401653582E-01;
    weight(17) = 0.241483028685479319601100262876E-01;

  elseif ( order == 18 )

    xtab(1) =  - 0.991565168420930946730016004706;
    xtab(2) =  - 0.955823949571397755181195892930;
    xtab(3) =  - 0.892602466497555739206060591127;
    xtab(4) =  - 0.803704958972523115682417455015;
    xtab(5) =  - 0.691687043060353207874891081289;
    xtab(6) =  - 0.559770831073947534607871548525;
    xtab(7) =  - 0.411751161462842646035931793833;
    xtab(8) =  - 0.251886225691505509588972854878;
    xtab(9) =  - 0.847750130417353012422618529358E-01;
    xtab(10) =   0.847750130417353012422618529358E-01;
    xtab(11) =   0.251886225691505509588972854878;
    xtab(12) =   0.411751161462842646035931793833;
    xtab(13) =   0.559770831073947534607871548525;
    xtab(14) =   0.691687043060353207874891081289;
    xtab(15) =   0.803704958972523115682417455015;
    xtab(16) =   0.892602466497555739206060591127;
    xtab(17) =   0.955823949571397755181195892930;
    xtab(18) =   0.991565168420930946730016004706;

    weight(1) =  0.216160135264833103133427102665E-01;
    weight(2) =  0.497145488949697964533349462026E-01;
    weight(3) =  0.764257302548890565291296776166E-01;
    weight(4) =  0.100942044106287165562813984925;
    weight(5) =  0.122555206711478460184519126800;
    weight(6) =  0.140642914670650651204731303752;
    weight(7) =  0.154684675126265244925418003836;
    weight(8) =  0.164276483745832722986053776466;
    weight(9) =  0.169142382963143591840656470135;
    weight(10) = 0.169142382963143591840656470135;
    weight(11) = 0.164276483745832722986053776466;
    weight(12) = 0.154684675126265244925418003836;
    weight(13) = 0.140642914670650651204731303752;
    weight(14) = 0.122555206711478460184519126800;
    weight(15) = 0.100942044106287165562813984925;
    weight(16) = 0.764257302548890565291296776166E-01;
    weight(17) = 0.497145488949697964533349462026E-01;
    weight(18) = 0.216160135264833103133427102665E-01;

  elseif ( order == 19 )

    xtab(1) =  - 0.992406843843584403189017670253;
    xtab(2) =  - 0.960208152134830030852778840688;
    xtab(3) =  - 0.903155903614817901642660928532;
    xtab(4) =  - 0.822714656537142824978922486713;
    xtab(5) =  - 0.720966177335229378617095860824;
    xtab(6) =  - 0.600545304661681023469638164946;
    xtab(7) =  - 0.464570741375960945717267148104;
    xtab(8) =  - 0.316564099963629831990117328850;
    xtab(9) =  - 0.160358645640225375868096115741;
    xtab(10) =   0.0;
    xtab(11) =   0.160358645640225375868096115741;
    xtab(12) =   0.316564099963629831990117328850;
    xtab(13) =   0.464570741375960945717267148104;
    xtab(14) =   0.600545304661681023469638164946;
    xtab(15) =   0.720966177335229378617095860824;
    xtab(16) =   0.822714656537142824978922486713;
    xtab(17) =   0.903155903614817901642660928532;
    xtab(18) =   0.960208152134830030852778840688;
    xtab(19) =   0.992406843843584403189017670253;

    weight(1) =  0.194617882297264770363120414644E-01;
    weight(2) =  0.448142267656996003328381574020E-01;
    weight(3) =  0.690445427376412265807082580060E-01;
    weight(4) =  0.914900216224499994644620941238E-01;
    weight(5) =  0.111566645547333994716023901682;
    weight(6) =  0.128753962539336227675515784857;
    weight(7) =  0.142606702173606611775746109442;
    weight(8) =  0.152766042065859666778855400898;
    weight(9) =  0.158968843393954347649956439465;
    weight(10) = 0.161054449848783695979163625321;
    weight(11) = 0.158968843393954347649956439465;
    weight(12) = 0.152766042065859666778855400898;
    weight(13) = 0.142606702173606611775746109442;
    weight(14) = 0.128753962539336227675515784857;
    weight(15) = 0.111566645547333994716023901682;
    weight(16) = 0.914900216224499994644620941238E-01;
    weight(17) = 0.690445427376412265807082580060E-01;
    weight(18) = 0.448142267656996003328381574020E-01;
    weight(19) = 0.194617882297264770363120414644E-01;

  elseif ( order == 20 )

    xtab(1) =  - 0.993128599185094924786122388471;
    xtab(2) =  - 0.963971927277913791267666131197;
    xtab(3) =  - 0.912234428251325905867752441203;
    xtab(4) =  - 0.839116971822218823394529061702;
    xtab(5) =  - 0.746331906460150792614305070356;
    xtab(6) =  - 0.636053680726515025452836696226;
    xtab(7) =  - 0.510867001950827098004364050955;
    xtab(8) =  - 0.373706088715419560672548177025;
    xtab(9) =  - 0.227785851141645078080496195369;
    xtab(10) = - 0.765265211334973337546404093988E-01;
    xtab(11) =   0.765265211334973337546404093988E-01;
    xtab(12) =   0.227785851141645078080496195369;
    xtab(13) =   0.373706088715419560672548177025;
    xtab(14) =   0.510867001950827098004364050955;
    xtab(15) =   0.636053680726515025452836696226;
    xtab(16) =   0.746331906460150792614305070356;
    xtab(17) =   0.839116971822218823394529061702;
    xtab(18) =   0.912234428251325905867752441203;
    xtab(19) =   0.963971927277913791267666131197;
    xtab(20) =   0.993128599185094924786122388471;

    weight(1) =  0.176140071391521183118619623519E-01;
    weight(2) =  0.406014298003869413310399522749E-01;
    weight(3) =  0.626720483341090635695065351870E-01;
    weight(4) =  0.832767415767047487247581432220E-01;
    weight(5) =  0.101930119817240435036750135480;
    weight(6) =  0.118194531961518417312377377711;
    weight(7) =  0.131688638449176626898494499748;
    weight(8) =  0.142096109318382051329298325067;
    weight(9) =  0.149172986472603746787828737002;
    weight(10) = 0.152753387130725850698084331955;
    weight(11) = 0.152753387130725850698084331955;
    weight(12) = 0.149172986472603746787828737002;
    weight(13) = 0.142096109318382051329298325067;
    weight(14) = 0.131688638449176626898494499748;
    weight(15) = 0.118194531961518417312377377711;
    weight(16) = 0.101930119817240435036750135480;
    weight(17) = 0.832767415767047487247581432220E-01;
    weight(18) = 0.626720483341090635695065351870E-01;
    weight(19) = 0.406014298003869413310399522749E-01;
    weight(20) = 0.176140071391521183118619623519E-01;

  elseif ( order == 21 )

    xtab( 1) =  -0.9937521706203896E+00;
    xtab( 2) =  -0.9672268385663063E+00;
    xtab( 3) =  -0.9200993341504008E+00;
    xtab( 4) =  -0.8533633645833173E+00;
    xtab( 5) =  -0.7684399634756779E+00;
    xtab( 6) =  -0.6671388041974123E+00;
    xtab( 7) =  -0.5516188358872198E+00;
    xtab( 8) =  -0.4243421202074388E+00;
    xtab( 9) =  -0.2880213168024011E+00;
    xtab(10) =  -0.1455618541608951E+00;
    xtab(11) =   0.0000000000000000E+00;
    xtab(12) =   0.1455618541608951E+00;
    xtab(13) =   0.2880213168024011E+00;
    xtab(14) =   0.4243421202074388E+00;
    xtab(15) =   0.5516188358872198E+00;
    xtab(16) =   0.6671388041974123E+00;
    xtab(17) =   0.7684399634756779E+00;
    xtab(18) =   0.8533633645833173E+00;
    xtab(19) =   0.9200993341504008E+00;
    xtab(20) =   0.9672268385663063E+00;
    xtab(21) =   0.9937521706203896E+00;

    weight( 1) =   0.1601722825777420E-01;
    weight( 2) =   0.3695378977085242E-01;
    weight( 3) =   0.5713442542685715E-01;
    weight( 4) =   0.7610011362837928E-01;
    weight( 5) =   0.9344442345603393E-01;
    weight( 6) =   0.1087972991671484E+00;
    weight( 7) =   0.1218314160537285E+00;
    weight( 8) =   0.1322689386333373E+00;
    weight( 9) =   0.1398873947910731E+00;
    weight(10) =   0.1445244039899700E+00;
    weight(11) =   0.1460811336496904E+00;
    weight(12) =   0.1445244039899700E+00;
    weight(13) =   0.1398873947910731E+00;
    weight(14) =   0.1322689386333373E+00;
    weight(15) =   0.1218314160537285E+00;
    weight(16) =   0.1087972991671484E+00;
    weight(17) =   0.9344442345603393E-01;
    weight(18) =   0.7610011362837928E-01;
    weight(19) =   0.5713442542685715E-01;
    weight(20) =   0.3695378977085242E-01;
    weight(21) =   0.1601722825777420E-01;

  elseif ( order == 22 )

    xtab( 1) =  -0.9942945854823994E+00;
    xtab( 2) =  -0.9700604978354287E+00;
    xtab( 3) =  -0.9269567721871740E+00;
    xtab( 4) =  -0.8658125777203002E+00;
    xtab( 5) =  -0.7878168059792081E+00;
    xtab( 6) =  -0.6944872631866827E+00;
    xtab( 7) =  -0.5876404035069116E+00;
    xtab( 8) =  -0.4693558379867570E+00;
    xtab( 9) =  -0.3419358208920842E+00;
    xtab(10) =  -0.2078604266882213E+00;
    xtab(11) =  -0.6973927331972223E-01;
    xtab(12) =   0.6973927331972223E-01;
    xtab(13) =   0.2078604266882213E+00;
    xtab(14) =   0.3419358208920842E+00;
    xtab(15) =   0.4693558379867570E+00;
    xtab(16) =   0.5876404035069116E+00;
    xtab(17) =   0.6944872631866827E+00;
    xtab(18) =   0.7878168059792081E+00;
    xtab(19) =   0.8658125777203002E+00;
    xtab(20) =   0.9269567721871740E+00;
    xtab(21) =   0.9700604978354287E+00;
    xtab(22) =   0.9942945854823994E+00;

    weight( 1) =   0.1462799529827203E-01;
    weight( 2) =   0.3377490158481413E-01;
    weight( 3) =   0.5229333515268327E-01;
    weight( 4) =   0.6979646842452038E-01;
    weight( 5) =   0.8594160621706777E-01;
    weight( 6) =   0.1004141444428809E+00;
    weight( 7) =   0.1129322960805392E+00;
    weight( 8) =   0.1232523768105124E+00;
    weight( 9) =   0.1311735047870623E+00;
    weight(10) =   0.1365414983460152E+00;
    weight(11) =   0.1392518728556321E+00;
    weight(12) =   0.1392518728556321E+00;
    weight(13) =   0.1365414983460152E+00;
    weight(14) =   0.1311735047870623E+00;
    weight(15) =   0.1232523768105124E+00;
    weight(16) =   0.1129322960805392E+00;
    weight(17) =   0.1004141444428809E+00;
    weight(18) =   0.8594160621706777E-01;
    weight(19) =   0.6979646842452038E-01;
    weight(20) =   0.5229333515268327E-01;
    weight(21) =   0.3377490158481413E-01;
    weight(22) =   0.1462799529827203E-01;

  elseif ( order == 23 )

    xtab( 1) =  -0.9947693349975522E+00;
    xtab( 2) =  -0.9725424712181152E+00;
    xtab( 3) =  -0.9329710868260161E+00;
    xtab( 4) =  -0.8767523582704416E+00;
    xtab( 5) =  -0.8048884016188399E+00;
    xtab( 6) =  -0.7186613631319502E+00;
    xtab( 7) =  -0.6196098757636461E+00;
    xtab( 8) =  -0.5095014778460075E+00;
    xtab( 9) =  -0.3903010380302908E+00;
    xtab(10) =  -0.2641356809703449E+00;
    xtab(11) =  -0.1332568242984661E+00;
    xtab(12) =   0.0000000000000000E+00;
    xtab(13) =   0.1332568242984661E+00;
    xtab(14) =   0.2641356809703449E+00;
    xtab(15) =   0.3903010380302908E+00;
    xtab(16) =   0.5095014778460075E+00;
    xtab(17) =   0.6196098757636461E+00;
    xtab(18) =   0.7186613631319502E+00;
    xtab(19) =   0.8048884016188399E+00;
    xtab(20) =   0.8767523582704416E+00;
    xtab(21) =   0.9329710868260161E+00;
    xtab(22) =   0.9725424712181152E+00;
    xtab(23) =   0.9947693349975522E+00;

    weight( 1) =   0.1341185948714167E-01;
    weight( 2) =   0.3098800585697944E-01;
    weight( 3) =   0.4803767173108464E-01;
    weight( 4) =   0.6423242140852586E-01;
    weight( 5) =   0.7928141177671895E-01;
    weight( 6) =   0.9291576606003514E-01;
    weight( 7) =   0.1048920914645414E+00;
    weight( 8) =   0.1149966402224114E+00;
    weight( 9) =   0.1230490843067295E+00;
    weight(10) =   0.1289057221880822E+00;
    weight(11) =   0.1324620394046967E+00;
    weight(12) =   0.1336545721861062E+00;
    weight(13) =   0.1324620394046967E+00;
    weight(14) =   0.1289057221880822E+00;
    weight(15) =   0.1230490843067295E+00;
    weight(16) =   0.1149966402224114E+00;
    weight(17) =   0.1048920914645414E+00;
    weight(18) =   0.9291576606003514E-01;
    weight(19) =   0.7928141177671895E-01;
    weight(20) =   0.6423242140852586E-01;
    weight(21) =   0.4803767173108464E-01;
    weight(22) =   0.3098800585697944E-01;
    weight(23) =   0.1341185948714167E-01;

  elseif ( order == 24 )

    xtab( 1) =  -0.9951872199970213E+00;
    xtab( 2) =  -0.9747285559713095E+00;
    xtab( 3) =  -0.9382745520027327E+00;
    xtab( 4) =  -0.8864155270044011E+00;
    xtab( 5) =  -0.8200019859739029E+00;
    xtab( 6) =  -0.7401241915785544E+00;
    xtab( 7) =  -0.6480936519369755E+00;
    xtab( 8) =  -0.5454214713888396E+00;
    xtab( 9) =  -0.4337935076260451E+00;
    xtab(10) =  -0.3150426796961634E+00;
    xtab(11) =  -0.1911188674736163E+00;
    xtab(12) =  -0.6405689286260562E-01;
    xtab(13) =   0.6405689286260562E-01;
    xtab(14) =   0.1911188674736163E+00;
    xtab(15) =   0.3150426796961634E+00;
    xtab(16) =   0.4337935076260451E+00;
    xtab(17) =   0.5454214713888396E+00;
    xtab(18) =   0.6480936519369755E+00;
    xtab(19) =   0.7401241915785544E+00;
    xtab(20) =   0.8200019859739029E+00;
    xtab(21) =   0.8864155270044011E+00;
    xtab(22) =   0.9382745520027327E+00;
    xtab(23) =   0.9747285559713095E+00;
    xtab(24) =   0.9951872199970213E+00;

    weight( 1) =   0.1234122979998730E-01;
    weight( 2) =   0.2853138862893375E-01;
    weight( 3) =   0.4427743881741982E-01;
    weight( 4) =   0.5929858491543672E-01;
    weight( 5) =   0.7334648141108031E-01;
    weight( 6) =   0.8619016153195320E-01;
    weight( 7) =   0.9761865210411380E-01;
    weight( 8) =   0.1074442701159656E+00;
    weight( 9) =   0.1155056680537256E+00;
    weight(10) =   0.1216704729278035E+00;
    weight(11) =   0.1258374563468283E+00;
    weight(12) =   0.1279381953467521E+00;
    weight(13) =   0.1279381953467521E+00;
    weight(14) =   0.1258374563468283E+00;
    weight(15) =   0.1216704729278035E+00;
    weight(16) =   0.1155056680537256E+00;
    weight(17) =   0.1074442701159656E+00;
    weight(18) =   0.9761865210411380E-01;
    weight(19) =   0.8619016153195320E-01;
    weight(20) =   0.7334648141108031E-01;
    weight(21) =   0.5929858491543672E-01;
    weight(22) =   0.4427743881741982E-01;
    weight(23) =   0.2853138862893375E-01;
    weight(24) =   0.1234122979998730E-01;

  elseif ( order == 25 )

    xtab( 1) =  -0.9955569697904981E+00;
    xtab( 2) =  -0.9766639214595175E+00;
    xtab( 3) =  -0.9429745712289743E+00;
    xtab( 4) =  -0.8949919978782754E+00;
    xtab( 5) =  -0.8334426287608340E+00;
    xtab( 6) =  -0.7592592630373577E+00;
    xtab( 7) =  -0.6735663684734684E+00;
    xtab( 8) =  -0.5776629302412229E+00;
    xtab( 9) =  -0.4730027314457150E+00;
    xtab(10) =  -0.3611723058093879E+00;
    xtab(11) =  -0.2438668837209884E+00;
    xtab(12) =  -0.1228646926107104E+00;
    xtab(13) =   0.0000000000000000E+00;
    xtab(14) =   0.1228646926107104E+00;
    xtab(15) =   0.2438668837209884E+00;
    xtab(16) =   0.3611723058093879E+00;
    xtab(17) =   0.4730027314457150E+00;
    xtab(18) =   0.5776629302412229E+00;
    xtab(19) =   0.6735663684734684E+00;
    xtab(20) =   0.7592592630373577E+00;
    xtab(21) =   0.8334426287608340E+00;
    xtab(22) =   0.8949919978782754E+00;
    xtab(23) =   0.9429745712289743E+00;
    xtab(24) =   0.9766639214595175E+00;
    xtab(25) =   0.9955569697904981E+00;

    weight( 1) =   0.1139379850102617E-01;
    weight( 2) =   0.2635498661503214E-01;
    weight( 3) =   0.4093915670130639E-01;
    weight( 4) =   0.5490469597583517E-01;
    weight( 5) =   0.6803833381235694E-01;
    weight( 6) =   0.8014070033500101E-01;
    weight( 7) =   0.9102826198296370E-01;
    weight( 8) =   0.1005359490670506E+00;
    weight( 9) =   0.1085196244742637E+00;
    weight(10) =   0.1148582591457116E+00;
    weight(11) =   0.1194557635357847E+00;
    weight(12) =   0.1222424429903101E+00;
    weight(13) =   0.1231760537267154E+00;
    weight(14) =   0.1222424429903101E+00;
    weight(15) =   0.1194557635357847E+00;
    weight(16) =   0.1148582591457116E+00;
    weight(17) =   0.1085196244742637E+00;
    weight(18) =   0.1005359490670506E+00;
    weight(19) =   0.9102826198296370E-01;
    weight(20) =   0.8014070033500101E-01;
    weight(21) =   0.6803833381235694E-01;
    weight(22) =   0.5490469597583517E-01;
    weight(23) =   0.4093915670130639E-01;
    weight(24) =   0.2635498661503214E-01;
    weight(25) =   0.1139379850102617E-01;

  elseif ( order == 26 )

    xtab( 1) =  -0.9958857011456169E+00;
    xtab( 2) =  -0.9783854459564710E+00;
    xtab( 3) =  -0.9471590666617142E+00;
    xtab( 4) =  -0.9026378619843071E+00;
    xtab( 5) =  -0.8454459427884981E+00;
    xtab( 6) =  -0.7763859488206789E+00;
    xtab( 7) =  -0.6964272604199573E+00;
    xtab( 8) =  -0.6066922930176181E+00;
    xtab( 9) =  -0.5084407148245057E+00;
    xtab(10) =  -0.4030517551234863E+00;
    xtab(11) =  -0.2920048394859569E+00;
    xtab(12) =  -0.1768588203568902E+00;
    xtab(13) =  -0.5923009342931320E-01;
    xtab(14) =   0.5923009342931320E-01;
    xtab(15) =   0.1768588203568902E+00;
    xtab(16) =   0.2920048394859569E+00;
    xtab(17) =   0.4030517551234863E+00;
    xtab(18) =   0.5084407148245057E+00;
    xtab(19) =   0.6066922930176181E+00;
    xtab(20) =   0.6964272604199573E+00;
    xtab(21) =   0.7763859488206789E+00;
    xtab(22) =   0.8454459427884981E+00;
    xtab(23) =   0.9026378619843071E+00;
    xtab(24) =   0.9471590666617142E+00;
    xtab(25) =   0.9783854459564710E+00;
    xtab(26) =   0.9958857011456169E+00;

    weight( 1) =   0.1055137261734304E-01;
    weight( 2) =   0.2441785109263173E-01;
    weight( 3) =   0.3796238329436282E-01;
    weight( 4) =   0.5097582529714782E-01;
    weight( 5) =   0.6327404632957484E-01;
    weight( 6) =   0.7468414976565967E-01;
    weight( 7) =   0.8504589431348521E-01;
    weight( 8) =   0.9421380035591416E-01;
    weight( 9) =   0.1020591610944255E+00;
    weight(10) =   0.1084718405285765E+00;
    weight(11) =   0.1133618165463197E+00;
    weight(12) =   0.1166604434852967E+00;
    weight(13) =   0.1183214152792622E+00;
    weight(14) =   0.1183214152792622E+00;
    weight(15) =   0.1166604434852967E+00;
    weight(16) =   0.1133618165463197E+00;
    weight(17) =   0.1084718405285765E+00;
    weight(18) =   0.1020591610944255E+00;
    weight(19) =   0.9421380035591416E-01;
    weight(20) =   0.8504589431348521E-01;
    weight(21) =   0.7468414976565967E-01;
    weight(22) =   0.6327404632957484E-01;
    weight(23) =   0.5097582529714782E-01;
    weight(24) =   0.3796238329436282E-01;
    weight(25) =   0.2441785109263173E-01;
    weight(26) =   0.1055137261734304E-01;

  elseif ( order == 27 )

    xtab( 1) =  -0.9961792628889886E+00;
    xtab( 2) =  -0.9799234759615012E+00;
    xtab( 3) =  -0.9509005578147051E+00;
    xtab( 4) =  -0.9094823206774911E+00;
    xtab( 5) =  -0.8562079080182945E+00;
    xtab( 6) =  -0.7917716390705082E+00;
    xtab( 7) =  -0.7170134737394237E+00;
    xtab( 8) =  -0.6329079719464952E+00;
    xtab( 9) =  -0.5405515645794569E+00;
    xtab(10) =  -0.4411482517500269E+00;
    xtab(11) =  -0.3359939036385089E+00;
    xtab(12) =  -0.2264593654395369E+00;
    xtab(13) =  -0.1139725856095300E+00;
    xtab(14) =   0.0000000000000000E+00;
    xtab(15) =   0.1139725856095300E+00;
    xtab(16) =   0.2264593654395369E+00;
    xtab(17) =   0.3359939036385089E+00;
    xtab(18) =   0.4411482517500269E+00;
    xtab(19) =   0.5405515645794569E+00;
    xtab(20) =   0.6329079719464952E+00;
    xtab(21) =   0.7170134737394237E+00;
    xtab(22) =   0.7917716390705082E+00;
    xtab(23) =   0.8562079080182945E+00;
    xtab(24) =   0.9094823206774911E+00;
    xtab(25) =   0.9509005578147051E+00;
    xtab(26) =   0.9799234759615012E+00;
    xtab(27) =   0.9961792628889886E+00;

    weight( 1) =   0.9798996051294232E-02;
    weight( 2) =   0.2268623159618062E-01;
    weight( 3) =   0.3529705375741969E-01;
    weight( 4) =   0.4744941252061504E-01;
    weight( 5) =   0.5898353685983366E-01;
    weight( 6) =   0.6974882376624561E-01;
    weight( 7) =   0.7960486777305781E-01;
    weight( 8) =   0.8842315854375689E-01;
    weight( 9) =   0.9608872737002842E-01;
    weight(10) =   0.1025016378177459E+00;
    weight(11) =   0.1075782857885332E+00;
    weight(12) =   0.1112524883568452E+00;
    weight(13) =   0.1134763461089651E+00;
    weight(14) =   0.1142208673789570E+00;
    weight(15) =   0.1134763461089651E+00;
    weight(16) =   0.1112524883568452E+00;
    weight(17) =   0.1075782857885332E+00;
    weight(18) =   0.1025016378177459E+00;
    weight(19) =   0.9608872737002842E-01;
    weight(20) =   0.8842315854375689E-01;
    weight(21) =   0.7960486777305781E-01;
    weight(22) =   0.6974882376624561E-01;
    weight(23) =   0.5898353685983366E-01;
    weight(24) =   0.4744941252061504E-01;
    weight(25) =   0.3529705375741969E-01;
    weight(26) =   0.2268623159618062E-01;
    weight(27) =   0.9798996051294232E-02;

  elseif ( order == 28 )

    xtab( 1) =  -0.9964424975739544E+00;
    xtab( 2) =  -0.9813031653708728E+00;
    xtab( 3) =  -0.9542592806289382E+00;
    xtab( 4) =  -0.9156330263921321E+00;
    xtab( 5) =  -0.8658925225743951E+00;
    xtab( 6) =  -0.8056413709171791E+00;
    xtab( 7) =  -0.7356108780136318E+00;
    xtab( 8) =  -0.6566510940388650E+00;
    xtab( 9) =  -0.5697204718114017E+00;
    xtab(10) =  -0.4758742249551183E+00;
    xtab(11) =  -0.3762515160890787E+00;
    xtab(12) =  -0.2720616276351780E+00;
    xtab(13) =  -0.1645692821333808E+00;
    xtab(14) =  -0.5507928988403427E-01;
    xtab(15) =   0.5507928988403427E-01;
    xtab(16) =   0.1645692821333808E+00;
    xtab(17) =   0.2720616276351780E+00;
    xtab(18) =   0.3762515160890787E+00;
    xtab(19) =   0.4758742249551183E+00;
    xtab(20) =   0.5697204718114017E+00;
    xtab(21) =   0.6566510940388650E+00;
    xtab(22) =   0.7356108780136318E+00;
    xtab(23) =   0.8056413709171791E+00;
    xtab(24) =   0.8658925225743951E+00;
    xtab(25) =   0.9156330263921321E+00;
    xtab(26) =   0.9542592806289382E+00;
    xtab(27) =   0.9813031653708728E+00;
    xtab(28) =   0.9964424975739544E+00;

    weight( 1) =   0.9124282593094672E-02;
    weight( 2) =   0.2113211259277118E-01;
    weight( 3) =   0.3290142778230441E-01;
    weight( 4) =   0.4427293475900429E-01;
    weight( 5) =   0.5510734567571667E-01;
    weight( 6) =   0.6527292396699959E-01;
    weight( 7) =   0.7464621423456877E-01;
    weight( 8) =   0.8311341722890127E-01;
    weight( 9) =   0.9057174439303289E-01;
    weight(10) =   0.9693065799792999E-01;
    weight(11) =   0.1021129675780608E+00;
    weight(12) =   0.1060557659228464E+00;
    weight(13) =   0.1087111922582942E+00;
    weight(14) =   0.1100470130164752E+00;
    weight(15) =   0.1100470130164752E+00;
    weight(16) =   0.1087111922582942E+00;
    weight(17) =   0.1060557659228464E+00;
    weight(18) =   0.1021129675780608E+00;
    weight(19) =   0.9693065799792999E-01;
    weight(20) =   0.9057174439303289E-01;
    weight(21) =   0.8311341722890127E-01;
    weight(22) =   0.7464621423456877E-01;
    weight(23) =   0.6527292396699959E-01;
    weight(24) =   0.5510734567571667E-01;
    weight(25) =   0.4427293475900429E-01;
    weight(26) =   0.3290142778230441E-01;
    weight(27) =   0.2113211259277118E-01;
    weight(28) =   0.9124282593094672E-02;

  elseif ( order == 29 )

    xtab( 1) =  -0.9966794422605966E+00;
    xtab( 2) =  -0.9825455052614132E+00;
    xtab( 3) =  -0.9572855957780877E+00;
    xtab( 4) =  -0.9211802329530588E+00;
    xtab( 5) =  -0.8746378049201028E+00;
    xtab( 6) =  -0.8181854876152524E+00;
    xtab( 7) =  -0.7524628517344771E+00;
    xtab( 8) =  -0.6782145376026865E+00;
    xtab( 9) =  -0.5962817971382278E+00;
    xtab(10) =  -0.5075929551242276E+00;
    xtab(11) =  -0.4131528881740087E+00;
    xtab(12) =  -0.3140316378676399E+00;
    xtab(13) =  -0.2113522861660011E+00;
    xtab(14) =  -0.1062782301326792E+00;
    xtab(15) =   0.0000000000000000E+00;
    xtab(16) =   0.1062782301326792E+00;
    xtab(17) =   0.2113522861660011E+00;
    xtab(18) =   0.3140316378676399E+00;
    xtab(19) =   0.4131528881740087E+00;
    xtab(20) =   0.5075929551242276E+00;
    xtab(21) =   0.5962817971382278E+00;
    xtab(22) =   0.6782145376026865E+00;
    xtab(23) =   0.7524628517344771E+00;
    xtab(24) =   0.8181854876152524E+00;
    xtab(25) =   0.8746378049201028E+00;
    xtab(26) =   0.9211802329530588E+00;
    xtab(27) =   0.9572855957780877E+00;
    xtab(28) =   0.9825455052614132E+00;
    xtab(29) =   0.9966794422605966E+00;

    weight( 1) =   0.8516903878746365E-02;
    weight( 2) =   0.1973208505612276E-01;
    weight( 3) =   0.3074049220209360E-01;
    weight( 4) =   0.4140206251868281E-01;
    weight( 5) =   0.5159482690249799E-01;
    weight( 6) =   0.6120309065707916E-01;
    weight( 7) =   0.7011793325505125E-01;
    weight( 8) =   0.7823832713576385E-01;
    weight( 9) =   0.8547225736617248E-01;
    weight(10) =   0.9173775713925882E-01;
    weight(11) =   0.9696383409440862E-01;
    weight(12) =   0.1010912737599150E+00;
    weight(13) =   0.1040733100777293E+00;
    weight(14) =   0.1058761550973210E+00;
    weight(15) =   0.1064793817183143E+00;
    weight(16) =   0.1058761550973210E+00;
    weight(17) =   0.1040733100777293E+00;
    weight(18) =   0.1010912737599150E+00;
    weight(19) =   0.9696383409440862E-01;
    weight(20) =   0.9173775713925882E-01;
    weight(21) =   0.8547225736617248E-01;
    weight(22) =   0.7823832713576385E-01;
    weight(23) =   0.7011793325505125E-01;
    weight(24) =   0.6120309065707916E-01;
    weight(25) =   0.5159482690249799E-01;
    weight(26) =   0.4140206251868281E-01;
    weight(27) =   0.3074049220209360E-01;
    weight(28) =   0.1973208505612276E-01;
    weight(29) =   0.8516903878746365E-02;

  elseif ( order == 30 )

    xtab( 1) =  -0.9968934840746495E+00;
    xtab( 2) =  -0.9836681232797472E+00;
    xtab( 3) =  -0.9600218649683075E+00;
    xtab( 4) =  -0.9262000474292743E+00;
    xtab( 5) =  -0.8825605357920526E+00;
    xtab( 6) =  -0.8295657623827684E+00;
    xtab( 7) =  -0.7677774321048262E+00;
    xtab( 8) =  -0.6978504947933158E+00;
    xtab( 9) =  -0.6205261829892429E+00;
    xtab(10) =  -0.5366241481420199E+00;
    xtab(11) =  -0.4470337695380892E+00;
    xtab(12) =  -0.3527047255308781E+00;
    xtab(13) =  -0.2546369261678899E+00;
    xtab(14) =  -0.1538699136085835E+00;
    xtab(15) =  -0.5147184255531770E-01;
    xtab(16) =   0.5147184255531770E-01;
    xtab(17) =   0.1538699136085835E+00;
    xtab(18) =   0.2546369261678899E+00;
    xtab(19) =   0.3527047255308781E+00;
    xtab(20) =   0.4470337695380892E+00;
    xtab(21) =   0.5366241481420199E+00;
    xtab(22) =   0.6205261829892429E+00;
    xtab(23) =   0.6978504947933158E+00;
    xtab(24) =   0.7677774321048262E+00;
    xtab(25) =   0.8295657623827684E+00;
    xtab(26) =   0.8825605357920526E+00;
    xtab(27) =   0.9262000474292743E+00;
    xtab(28) =   0.9600218649683075E+00;
    xtab(29) =   0.9836681232797472E+00;
    xtab(30) =   0.9968934840746495E+00;

    weight( 1) =   0.7968192496166648E-02;
    weight( 2) =   0.1846646831109099E-01;
    weight( 3) =   0.2878470788332330E-01;
    weight( 4) =   0.3879919256962704E-01;
    weight( 5) =   0.4840267283059405E-01;
    weight( 6) =   0.5749315621761905E-01;
    weight( 7) =   0.6597422988218052E-01;
    weight( 8) =   0.7375597473770516E-01;
    weight( 9) =   0.8075589522942023E-01;
    weight(10) =   0.8689978720108314E-01;
    weight(11) =   0.9212252223778619E-01;
    weight(12) =   0.9636873717464424E-01;
    weight(13) =   0.9959342058679524E-01;
    weight(14) =   0.1017623897484056E+00;
    weight(15) =   0.1028526528935587E+00;
    weight(16) =   0.1028526528935587E+00;
    weight(17) =   0.1017623897484056E+00;
    weight(18) =   0.9959342058679524E-01;
    weight(19) =   0.9636873717464424E-01;
    weight(20) =   0.9212252223778619E-01;
    weight(21) =   0.8689978720108314E-01;
    weight(22) =   0.8075589522942023E-01;
    weight(23) =   0.7375597473770516E-01;
    weight(24) =   0.6597422988218052E-01;
    weight(25) =   0.5749315621761905E-01;
    weight(26) =   0.4840267283059405E-01;
    weight(27) =   0.3879919256962704E-01;
    weight(28) =   0.2878470788332330E-01;
    weight(29) =   0.1846646831109099E-01;
    weight(30) =   0.7968192496166648E-02;

  elseif ( order == 31 )

    xtab( 1) =  -0.9970874818194770E+00;
    xtab( 2) =  -0.9846859096651525E+00;
    xtab( 3) =  -0.9625039250929497E+00;
    xtab( 4) =  -0.9307569978966481E+00;
    xtab( 5) =  -0.8897600299482711E+00;
    xtab( 6) =  -0.8399203201462674E+00;
    xtab( 7) =  -0.7817331484166250E+00;
    xtab( 8) =  -0.7157767845868533E+00;
    xtab( 9) =  -0.6427067229242603E+00;
    xtab(10) =  -0.5632491614071492E+00;
    xtab(11) =  -0.4781937820449025E+00;
    xtab(12) =  -0.3883859016082329E+00;
    xtab(13) =  -0.2947180699817016E+00;
    xtab(14) =  -0.1981211993355706E+00;
    xtab(15) =  -0.9955531215234151E-01;
    xtab(16) =   0.0000000000000000E+00;
    xtab(17) =   0.9955531215234151E-01;
    xtab(18) =   0.1981211993355706E+00;
    xtab(19) =   0.2947180699817016E+00;
    xtab(20) =   0.3883859016082329E+00;
    xtab(21) =   0.4781937820449025E+00;
    xtab(22) =   0.5632491614071492E+00;
    xtab(23) =   0.6427067229242603E+00;
    xtab(24) =   0.7157767845868533E+00;
    xtab(25) =   0.7817331484166250E+00;
    xtab(26) =   0.8399203201462674E+00;
    xtab(27) =   0.8897600299482711E+00;
    xtab(28) =   0.9307569978966481E+00;
    xtab(29) =   0.9625039250929497E+00;
    xtab(30) =   0.9846859096651525E+00;
    xtab(31) =   0.9970874818194770E+00;

    weight( 1) =   0.7470831579248783E-02;
    weight( 2) =   0.1731862079031058E-01;
    weight( 3) =   0.2700901918497941E-01;
    weight( 4) =   0.3643227391238550E-01;
    weight( 5) =   0.4549370752720110E-01;
    weight( 6) =   0.5410308242491679E-01;
    weight( 7) =   0.6217478656102854E-01;
    weight( 8) =   0.6962858323541037E-01;
    weight( 9) =   0.7639038659877659E-01;
    weight(10) =   0.8239299176158929E-01;
    weight(11) =   0.8757674060847785E-01;
    weight(12) =   0.9189011389364142E-01;
    weight(13) =   0.9529024291231955E-01;
    weight(14) =   0.9774333538632875E-01;
    weight(15) =   0.9922501122667234E-01;
    weight(16) =   0.9972054479342644E-01;
    weight(17) =   0.9922501122667234E-01;
    weight(18) =   0.9774333538632875E-01;
    weight(19) =   0.9529024291231955E-01;
    weight(20) =   0.9189011389364142E-01;
    weight(21) =   0.8757674060847785E-01;
    weight(22) =   0.8239299176158929E-01;
    weight(23) =   0.7639038659877659E-01;
    weight(24) =   0.6962858323541037E-01;
    weight(25) =   0.6217478656102854E-01;
    weight(26) =   0.5410308242491679E-01;
    weight(27) =   0.4549370752720110E-01;
    weight(28) =   0.3643227391238550E-01;
    weight(29) =   0.2700901918497941E-01;
    weight(30) =   0.1731862079031058E-01;
    weight(31) =   0.7470831579248783E-02;

  elseif ( order == 32 )

    xtab(1) =  - 0.997263861849481563544981128665;
    xtab(2) =  - 0.985611511545268335400175044631;
    xtab(3) =  - 0.964762255587506430773811928118;
    xtab(4) =  - 0.934906075937739689170919134835;
    xtab(5) =  - 0.896321155766052123965307243719;
    xtab(6) =  - 0.849367613732569970133693004968;
    xtab(7) =  - 0.794483795967942406963097298970;
    xtab(8) =  - 0.732182118740289680387426665091;
    xtab(9) =  - 0.663044266930215200975115168663;
    xtab(10) = - 0.587715757240762329040745476402;
    xtab(11) = - 0.506899908932229390023747474378;
    xtab(12) = - 0.421351276130635345364119436172;
    xtab(13) = - 0.331868602282127649779916805730;
    xtab(14) = - 0.239287362252137074544603209166;
    xtab(15) = - 0.144471961582796493485186373599;
    xtab(16) = - 0.483076656877383162348125704405E-01;
    xtab(17) =   0.483076656877383162348125704405E-01;
    xtab(18) =   0.144471961582796493485186373599;
    xtab(19) =   0.239287362252137074544603209166;
    xtab(20) =   0.331868602282127649779916805730;
    xtab(21) =   0.421351276130635345364119436172;
    xtab(22) =   0.506899908932229390023747474378;
    xtab(23) =   0.587715757240762329040745476402;
    xtab(24) =   0.663044266930215200975115168663;
    xtab(25) =   0.732182118740289680387426665091;
    xtab(26) =   0.794483795967942406963097298970;
    xtab(27) =   0.849367613732569970133693004968;
    xtab(28) =   0.896321155766052123965307243719;
    xtab(29) =   0.934906075937739689170919134835;
    xtab(30) =   0.964762255587506430773811928118;
    xtab(31) =   0.985611511545268335400175044631;
    xtab(32) =   0.997263861849481563544981128665;

    weight(1) =  0.701861000947009660040706373885E-02;
    weight(2) =  0.162743947309056706051705622064E-01;
    weight(3) =  0.253920653092620594557525897892E-01;
    weight(4) =  0.342738629130214331026877322524E-01;
    weight(5) =  0.428358980222266806568786466061E-01;
    weight(6) =  0.509980592623761761961632446895E-01;
    weight(7) =  0.586840934785355471452836373002E-01;
    weight(8) =  0.658222227763618468376500637069E-01;
    weight(9) =  0.723457941088485062253993564785E-01;
    weight(10) = 0.781938957870703064717409188283E-01;
    weight(11) = 0.833119242269467552221990746043E-01;
    weight(12) = 0.876520930044038111427714627518E-01;
    weight(13) = 0.911738786957638847128685771116E-01;
    weight(14) = 0.938443990808045656391802376681E-01;
    weight(15) = 0.956387200792748594190820022041E-01;
    weight(16) = 0.965400885147278005667648300636E-01;
    weight(17) = 0.965400885147278005667648300636E-01;
    weight(18) = 0.956387200792748594190820022041E-01;
    weight(19) = 0.938443990808045656391802376681E-01;
    weight(20) = 0.911738786957638847128685771116E-01;
    weight(21) = 0.876520930044038111427714627518E-01;
    weight(22) = 0.833119242269467552221990746043E-01;
    weight(23) = 0.781938957870703064717409188283E-01;
    weight(24) = 0.723457941088485062253993564785E-01;
    weight(25) = 0.658222227763618468376500637069E-01;
    weight(26) = 0.586840934785355471452836373002E-01;
    weight(27) = 0.509980592623761761961632446895E-01;
    weight(28) = 0.428358980222266806568786466061E-01;
    weight(29) = 0.342738629130214331026877322524E-01;
    weight(30) = 0.253920653092620594557525897892E-01;
    weight(31) = 0.162743947309056706051705622064E-01;
    weight(32) = 0.701861000947009660040706373885E-02;

  elseif ( order == 64 )

    xtab(1) =  - 0.999305041735772139456905624346;
    xtab(2) =  - 0.996340116771955279346924500676;
    xtab(3) =  - 0.991013371476744320739382383443;
    xtab(4) =  - 0.983336253884625956931299302157;
    xtab(5) =  - 0.973326827789910963741853507352;
    xtab(6) =  - 0.961008799652053718918614121897;
    xtab(7) =  - 0.946411374858402816062481491347;
    xtab(8) =  - 0.929569172131939575821490154559;
    xtab(9) =  - 0.910522137078502805756380668008;
    xtab(10) = - 0.889315445995114105853404038273;
    xtab(11) = - 0.865999398154092819760783385070;
    xtab(12) = - 0.840629296252580362751691544696;
    xtab(13) = - 0.813265315122797559741923338086;
    xtab(14) = - 0.783972358943341407610220525214;
    xtab(15) = - 0.752819907260531896611863774886;
    xtab(16) = - 0.719881850171610826848940217832;
    xtab(17) = - 0.685236313054233242563558371031;
    xtab(18) = - 0.648965471254657339857761231993;
    xtab(19) = - 0.611155355172393250248852971019;
    xtab(20) = - 0.571895646202634034283878116659;
    xtab(21) = - 0.531279464019894545658013903544;
    xtab(22) = - 0.489403145707052957478526307022;
    xtab(23) = - 0.446366017253464087984947714759;
    xtab(24) = - 0.402270157963991603695766771260;
    xtab(25) = - 0.357220158337668115950442615046;
    xtab(26) = - 0.311322871990210956157512698560;
    xtab(27) = - 0.264687162208767416373964172510;
    xtab(28) = - 0.217423643740007084149648748989;
    xtab(29) = - 0.169644420423992818037313629748;
    xtab(30) = - 0.121462819296120554470376463492;
    xtab(31) = - 0.729931217877990394495429419403E-01;
    xtab(32) = - 0.243502926634244325089558428537E-01;
    xtab(33) =   0.243502926634244325089558428537E-01;
    xtab(34) =   0.729931217877990394495429419403E-01;
    xtab(35) =   0.121462819296120554470376463492;
    xtab(36) =   0.169644420423992818037313629748;
    xtab(37) =   0.217423643740007084149648748989;
    xtab(38) =   0.264687162208767416373964172510;
    xtab(39) =   0.311322871990210956157512698560;
    xtab(40) =   0.357220158337668115950442615046;
    xtab(41) =   0.402270157963991603695766771260;
    xtab(42) =   0.446366017253464087984947714759;
    xtab(43) =   0.489403145707052957478526307022;
    xtab(44) =   0.531279464019894545658013903544;
    xtab(45) =   0.571895646202634034283878116659;
    xtab(46) =   0.611155355172393250248852971019;
    xtab(47) =   0.648965471254657339857761231993;
    xtab(48) =   0.685236313054233242563558371031;
    xtab(49) =   0.719881850171610826848940217832;
    xtab(50) =   0.752819907260531896611863774886;
    xtab(51) =   0.783972358943341407610220525214;
    xtab(52) =   0.813265315122797559741923338086;
    xtab(53) =   0.840629296252580362751691544696;
    xtab(54) =   0.865999398154092819760783385070;
    xtab(55) =   0.889315445995114105853404038273;
    xtab(56) =   0.910522137078502805756380668008;
    xtab(57) =   0.929569172131939575821490154559;
    xtab(58) =   0.946411374858402816062481491347;
    xtab(59) =   0.961008799652053718918614121897;
    xtab(60) =   0.973326827789910963741853507352;
    xtab(61) =   0.983336253884625956931299302157;
    xtab(62) =   0.991013371476744320739382383443;
    xtab(63) =   0.996340116771955279346924500676;
    xtab(64) =   0.999305041735772139456905624346;

    weight(1) =  0.178328072169643294729607914497E-02;
    weight(2) =  0.414703326056246763528753572855E-02;
    weight(3) =  0.650445796897836285611736039998E-02;
    weight(4) =  0.884675982636394772303091465973E-02;
    weight(5) =  0.111681394601311288185904930192E-01;
    weight(6) =  0.134630478967186425980607666860E-01;
    weight(7) =  0.157260304760247193219659952975E-01;
    weight(8) =  0.179517157756973430850453020011E-01;
    weight(9) =  0.201348231535302093723403167285E-01;
    weight(10) = 0.222701738083832541592983303842E-01;
    weight(11) = 0.243527025687108733381775504091E-01;
    weight(12) = 0.263774697150546586716917926252E-01;
    weight(13) = 0.283396726142594832275113052002E-01;
    weight(14) = 0.302346570724024788679740598195E-01;
    weight(15) = 0.320579283548515535854675043479E-01;
    weight(16) = 0.338051618371416093915654821107E-01;
    weight(17) = 0.354722132568823838106931467152E-01;
    weight(18) = 0.370551285402400460404151018096E-01;
    weight(19) = 0.385501531786156291289624969468E-01;
    weight(20) = 0.399537411327203413866569261283E-01;
    weight(21) = 0.412625632426235286101562974736E-01;
    weight(22) = 0.424735151236535890073397679088E-01;
    weight(23) = 0.435837245293234533768278609737E-01;
    weight(24) = 0.445905581637565630601347100309E-01;
    weight(25) = 0.454916279274181444797709969713E-01;
    weight(26) = 0.462847965813144172959532492323E-01;
    weight(27) = 0.469681828162100173253262857546E-01;
    weight(28) = 0.475401657148303086622822069442E-01;
    weight(29) = 0.479993885964583077281261798713E-01;
    weight(30) = 0.483447622348029571697695271580E-01;
    weight(31) = 0.485754674415034269347990667840E-01;
    weight(32) = 0.486909570091397203833653907347E-01;
    weight(33) = 0.486909570091397203833653907347E-01;
    weight(34) = 0.485754674415034269347990667840E-01;
    weight(35) = 0.483447622348029571697695271580E-01;
    weight(36) = 0.479993885964583077281261798713E-01;
    weight(37) = 0.475401657148303086622822069442E-01;
    weight(38) = 0.469681828162100173253262857546E-01;
    weight(39) = 0.462847965813144172959532492323E-01;
    weight(40) = 0.454916279274181444797709969713E-01;
    weight(41) = 0.445905581637565630601347100309E-01;
    weight(42) = 0.435837245293234533768278609737E-01;
    weight(43) = 0.424735151236535890073397679088E-01;
    weight(44) = 0.412625632426235286101562974736E-01;
    weight(45) = 0.399537411327203413866569261283E-01;
    weight(46) = 0.385501531786156291289624969468E-01;
    weight(47) = 0.370551285402400460404151018096E-01;
    weight(48) = 0.354722132568823838106931467152E-01;
    weight(49) = 0.338051618371416093915654821107E-01;
    weight(50) = 0.320579283548515535854675043479E-01;
    weight(51) = 0.302346570724024788679740598195E-01;
    weight(52) = 0.283396726142594832275113052002E-01;
    weight(53) = 0.263774697150546586716917926252E-01;
    weight(54) = 0.243527025687108733381775504091E-01;
    weight(55) = 0.222701738083832541592983303842E-01;
    weight(56) = 0.201348231535302093723403167285E-01;
    weight(57) = 0.179517157756973430850453020011E-01;
    weight(58) = 0.157260304760247193219659952975E-01;
    weight(59) = 0.134630478967186425980607666860E-01;
    weight(60) = 0.111681394601311288185904930192E-01;
    weight(61) = 0.884675982636394772303091465973E-02;
    weight(62) = 0.650445796897836285611736039998E-02;
    weight(63) = 0.414703326056246763528753572855E-02;
    weight(64) = 0.178328072169643294729607914497E-02;

  else

    fprintf ( 1, '\n' );
    fprintf ( 1, 'GAUSS_LEGENDRE_SET - Fatal error!\n' );
    fprintf ( 1, '  Illegal value of ORDER = %d\n', order );
    fprintf ( 1, '  Legal values are 1 to 32 or 64.\n' );
    error ( 'GAUSS_LEGENDRE_SET - Fatal error!' );

  end

  return
end
