function [x,w] = knots_leja(n,x_a,x_b,type,whichrho)

% [X,W] = KNOTS_LEJA(N,A,B,<type>,'prob') returns N Leja points of type <type> between A and B, 
%   for the approximation of
%  
%   \int_a^b f(x) * 1/(b-a) dx
%
% [X,W] = KNOTS_LEJA(N,A,B,<type>,'nonprob') returns N Leja points of type <type> between A and B, 
%   for the approximation of
%
%   \int_a^b f(x) dx
%
% [X,W] = KNOTS_LEJA(N,A,B,<type>)  is the same as [X,W] = KNOTS_LEJA(N,A,B,<type>,'prob') 
%
% Follows the description of the choices of <type>.
%
% -----------------------------------------------------------
%
% [X,W] = KNOTS_LEJA(N,A,B,'line') given X(1)=B, X(2)=A, X(3)=(A+B)/2 recursively
%   defines the n-th point by 
%
%   X_n= argmax_[A B] prod_{k=1}^{n-1} abs(X-X_k)
%
%
% [X,W] = KNOTS_LEJA(N,A,B,'sym_line') given X(1)=(A+B)/2, X(2)=B, X(3)=A recursively
%   defines the n-th and (n+1)-th point by 
%
%   X_n= argmax_[A B] prod_{k=1}^{n-1} abs(X-X_k)
%   X_(n+1) = symmetric point of X_n with respect to (A+B)/2
%
%
%  [X,W] = KNOTS_LEJA(N,A,B,'p_disk') given  i=sqrt(-1) (imaginary unit), y(1)=1, y(2)=-1, y(3)=i, y(4)=-i,
%   recursively defines the m-th and (m+1)-th point by
%
%   X_m= argmax_[complex unit ball] prod_{k=1}^{m-1} abs(y-y_k)
%
%   and X is obtained by projecting the y sequence on the real interval [-1,1], collecting the first n unique
%   points and translating them to the interval [A,B].


%----------------------------------------------------
% Sparse Grid Matlab Kit
% Copyright (c) 2009-2023 L. Tamellini, F. Nobile
% See LICENSE.txt for license
%----------------------------------------------------


if nargin==4
    whichrho='prob';
end

% as a first step, we load the precomputed knots

switch type
            
    %--------------------------------------------------------
    case 'line'       
        [x,w] = line_leja_tab(n);
        
        
    %--------------------------------------------------------      
    case 'sym_line'
        [x,w] = sym_line_leja_tab(n);
        
                
    %--------------------------------------------------------        
    case 'p_disk'
        [x,w] = p_disk_leja_tab(n);
      
    %--------------------------------------------------------        
    otherwise
        error('SparseGKit:WrongInput','unknown leja type')

end


% Leja points have been precomputed on the interval (-1,1) and assuming a probabilistic weight, i.e. 
% the resulting quadrature rule is a discretization of \int_{-1}^1 f(x) 1/2 dx. 
% So now we need to rescale points and weights, if needed


% translation to a generic interval
if x_b~=1 || x_a~=-1
    scale_fact=(x_b-x_a)/2;
    tras=(x_b+x_a)/2;
    x=scale_fact*x+tras;
end

% fix weights 
switch whichrho
    case 'prob'
        % as mentioned above, weights precomputed are already probabilistic, so in this case there's nothing to do
    case 'nonprob'
        % in this case, we need to rescale. The 1/2 is already included in the precomputed weights, so we only need to
        % to multiply by (x_b-x_a)
        w=w*(x_b-x_a);
    otherwise
        error('SparseGKit:WrongInput','4th argument must be either prob or nonprob')
end

x=x';
w=w';







function [x,w] = line_leja_tab(n)

switch n
    case 1
        x= 1.00000000000000e+000;
        w= 1.00000000000000e+000;
    case 2
        x=[1.00000000000000e+000
          -1.00000000000000e+000];
        w=[500.000000000000e-003
           500.000000000000e-003];
    case 3
        x=[  1.00000000000000e+000
            -1.00000000000000e+000
             0.00000000000000e+000];
        w=[ 166.666666666667e-003
            166.666666666667e-003
            666.666666666667e-003];
    case 4
        x=[ 1.00000000000000e+000
           -1.00000000000000e+000
            0.00000000000000e+000
           -577.350268924798e-003];
        w=[ 166.666666666667e-003
            166.666666666667e-003
            666.666666666667e-003
            -22.2044604925031e-018];
    case 5
        x=[  1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003];
        w=[ 42.8290185642015e-003
            71.5714716034807e-003
            316.070345101866e-003
            280.254228390019e-003
            289.274936340433e-003];
    case 6
        x=[
            1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003];
        w=[    48.3067691398933e-003
            23.4421034394552e-003
            350.056744358474e-003
            193.197665620845e-003
            273.564014186842e-003
            111.432703254491e-003];
    case 7
        x=[    1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003];
        w=[ 58.6718801501010e-003
            29.7728959404980e-003
            340.447847751162e-003
            207.992731752012e-003
            291.853109564881e-003
            95.3967276116980e-003
            -24.1351927703515e-003];
    case 8
        x=[  1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003];
        w=[
            41.4773545038831e-003
            35.3583839900980e-003
            304.230315302631e-003
            227.294261711527e-003
            232.188004663928e-003
            79.2621431414998e-003
            25.1238696510073e-003
            55.0656670354259e-003];
    case 9
        x=[    1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            ];
        w=[    22.3498307690078e-003
            23.2510610879974e-003
            138.706128700551e-003
            116.284197397175e-003
            142.710316249525e-003
            125.098733403048e-003
            85.8978618057331e-003
            184.126678580736e-003
            161.575192006227e-003];
    case 10
        x=[    1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            ];
        w=[    21.7193806581730e-003
            36.8490537841373e-003
            127.464752533899e-003
            96.8403615325395e-003
            139.132668640459e-003
            153.398895738377e-003
            88.0446211393977e-003
            190.746319993147e-003
            178.230525141125e-003
            -32.4265791612546e-003];
    case 11
        x=[    1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003];
        w=[   -7.76737357066565e-003
            21.4346063506367e-003
            153.583854412418e-003
            124.970156889338e-003
            166.071713487513e-003
            118.440519996205e-003
            30.5617411664680e-003
            168.101301217005e-003
            149.301299106606e-003
            5.43730450115878e-003
            69.8648764433162e-003];
    case 12
        x=[    1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003];
        w=[    19.3238662293027e-003
            16.4511056816414e-003
            179.642079836325e-003
            137.701813974711e-003
            94.2076806278949e-003
            105.760729812860e-003
            100.951233204458e-003
            105.782197366321e-003
            132.029599851762e-003
            18.1694560403921e-003
            -743.141549369479e-006
            90.7233789237018e-003];
    case 13
        x=[ 1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003];
        w=[    11.7327990818601e-003
            8.12875831174446e-003
            162.094583459681e-003
            92.5407505802044e-003
            119.355739915476e-003
            57.7028306529114e-003
            79.6078237343942e-003
            135.152311515074e-003
            153.231491832580e-003
            44.6954155899136e-003
            19.6037524878986e-003
            54.2005773288810e-003
            61.9531655093814e-003];
    case 14
        x=[    1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            ];
        w=[ 11.0242085272258e-003
            9.19269939170045e-003
            149.954021347252e-003
            104.104910730012e-003
            122.686627694915e-003
            65.2919565668922e-003
            77.3630854934465e-003
            142.018261327330e-003
            139.428896057519e-003
            41.0586062849999e-003
            21.5841189281010e-003
            47.9980124275822e-003
            49.9445332896322e-003
            18.3500619333926e-003
            ];
    case 15
        x=[    1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            ];
        w=[    8.37200305705428e-003
            8.68758338942650e-003
            163.156312570990e-003
            96.8987063448977e-003
            98.5252004642494e-003
            61.3301354773791e-003
            57.4807715191048e-003
            129.689238093255e-003
            150.035128455455e-003
            42.8425271145415e-003
            30.9695060768848e-003
            65.6874194999263e-003
            56.7471192029004e-003
            1.73863125389863e-003
            27.8397174800358e-003];
    case 16
        x=[    1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            -979.477618704947e-003];
        w=[    8.28446080381937e-003
            10.2957258720367e-003
            164.036988125709e-003
            95.7278486517876e-003
            97.5615467511151e-003
            59.4841199058028e-003
            56.7783831367979e-003
            129.062399166347e-003
            151.088661646465e-003
            46.0359943201196e-003
            31.2868807764704e-003
            66.4796506148390e-003
            58.4127775037211e-003
            420.693319639558e-006
            28.8765527050293e-003
            -3.83268329969986e-003];
    case 17
        x=[    1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            -979.477618704947e-003
            161.165265742835e-003];
        w=[    7.32276154275362e-003
            -2.46655962627862e-003
            113.682004392036e-003
            110.337587257850e-003
            79.7135364639728e-003
            76.4881242556966e-003
            47.6472238669731e-003
            89.0732448687396e-003
            130.983231134466e-003
            19.3837040307627e-003
            34.9818851645071e-003
            89.4192306593379e-003
            40.8468979913129e-003
            38.7175341708008e-003
            44.4450459602770e-003
            27.1308993979376e-003
            52.2936484688558e-003];
    case 18
        x=[    1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            -979.477618704947e-003
            161.165265742835e-003
            983.326309543679e-003];
        w=[   -16.4577234261211e-003
            186.502636587980e-006
            134.795393925918e-003
            106.477983750795e-003
            102.382312417938e-003
            72.6415187156590e-003
            80.8699843784467e-003
            113.401422126103e-003
            137.335146986382e-003
            25.0882690126536e-003
            -14.7179076955011e-003
            70.6501841045253e-003
            45.1172746914104e-003
            24.8581646974206e-003
            13.6522186259272e-003
            20.6267958504942e-003
            26.0692697750169e-003
            57.0231894263445e-003];
    case 19
        x=[    1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            -979.477618704947e-003
            161.165265742835e-003
            983.326309543679e-003
            -461.370599173529e-003
            ];
        w=[ 2.92138503483691e-003
            6.05235109048162e-003
            80.2972769755282e-003
            66.8470525991962e-003
            78.2802854019073e-003
            60.5189935049818e-003
            51.1527852478613e-003
            75.6270927362270e-003
            83.1728765449641e-003
            39.1942003571033e-003
            27.1388079021232e-003
            94.4090790544827e-003
            65.3568962327189e-003
            78.9002274625798e-003
            43.3155002846272e-003
            5.67678794576708e-003
            76.2358252887600e-003
            10.0177396082236e-003
            54.8848367276299e-003];
    case 20
        x=[    1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            -979.477618704947e-003
            161.165265742835e-003
            983.326309543679e-003
            -461.370599173529e-003
            -891.892818936448e-003];
        w=[    3.44438169734110e-003
            3.28197998877799e-003
            77.1774501921205e-003
            60.4140085385363e-003
            77.4866599134829e-003
            48.7605455539218e-003
            50.2916164609569e-003
            74.0165188017832e-003
            78.3228672766612e-003
            25.0961702142957e-003
            28.2974053826538e-003
            95.2936930070266e-003
            71.1218356538178e-003
            82.6495691900958e-003
            44.2241707981739e-003
            14.3919272561803e-003
            78.6681615205469e-003
            8.73789323715940e-003
            61.3938994812328e-003
            16.9292458352353e-003];
    case 21
        x=[ 1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            -979.477618704947e-003
            161.165265742835e-003
            983.326309543679e-003
            -461.370599173529e-003
            -891.892818936448e-003
            571.897080663206e-003];
        w=[    4.23480835810195e-003
            4.42229461110827e-003
            80.7070336460447e-003
            64.0357201664944e-003
            71.5715999256549e-003
            54.1517684649136e-003
            48.4225596863691e-003
            77.9298521336409e-003
            81.8344910470293e-003
            31.1174960175982e-003
            30.2660786694432e-003
            89.1050634935962e-003
            68.2180843682239e-003
            79.3166856009538e-003
            47.1206751730964e-003
            10.7572280046428e-003
            74.8365972287798e-003
            6.72521870123524e-003
            57.3180656869764e-003
            9.44634968825709e-003
            8.46232932783958e-003];
    case 22
        x=[    1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            -979.477618704947e-003
            161.165265742835e-003
            983.326309543679e-003
            -461.370599173529e-003
            -891.892818936448e-003
            571.897080663206e-003
            912.559741385175e-003];
        w=[    7.72676772832005e-003
            4.19197616676180e-003
            79.2129284215335e-003
            63.0967044431732e-003
            80.5727008414375e-003
            52.9629423037484e-003
            65.3899663980743e-003
            75.4391859506203e-003
            80.7354402308541e-003
            29.8639476581569e-003
            49.2244843339326e-003
            94.6242845761501e-003
            68.9082797821810e-003
            80.5216019225961e-003
            38.9942599049321e-003
            11.4993201055084e-003
            76.8064200037227e-003
            -4.26141011389359e-003
            58.4640291909385e-003
            11.0482787635798e-003
            -1.13354217110021e-003
            -23.8885664412275e-003];
    case 23
        x=[    1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            -979.477618704947e-003
            161.165265742835e-003
            983.326309543679e-003
            -461.370599173529e-003
            -891.892818936448e-003
            571.897080663206e-003
            912.559741385175e-003
            -649.253523752608e-003];
        w=[ 4.88502436749537e-003
            3.31064628628673e-003
            82.3015874113679e-003
            80.6245043654116e-003
            71.3362691473467e-003
            44.5651259711818e-003
            50.4004967222968e-003
            78.9400544827063e-003
            85.2389248384539e-003
            24.1359570112457e-003
            33.3403979933382e-003
            88.0610866832630e-003
            83.5229116255787e-003
            77.2432618087017e-003
            46.6529365071911e-003
            14.5154645966124e-003
            73.5441436693703e-003
            4.77078097832099e-003
            50.2777497065350e-003
            19.9093298614005e-003
            9.41319898759811e-003
            -3.35974231807715e-003
            -23.6301107036256e-003];
    case 24
        x=[    1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            -979.477618704947e-003
            161.165265742835e-003
            983.326309543679e-003
            -461.370599173529e-003
            -891.892818936448e-003
            571.897080663206e-003
            912.559741385175e-003
            -649.253523752608e-003
            79.8179729527134e-003
            ];
        w=[ 3.49556777092615e-003
            3.67786247615866e-003
            64.8914120804265e-003
            68.6244084642679e-003
            64.1576140228207e-003
            48.6761559830834e-003
            41.8657807913286e-003
            85.9158651537491e-003
            80.1926681674099e-003
            26.6556444229716e-003
            25.1528498939399e-003
            80.6713317632017e-003
            75.2254306817667e-003
            83.4991045632345e-003
            51.6105062662528e-003
            13.2344064123944e-003
            55.5010286096931e-003
            9.26852598945051e-003
            57.0834344500888e-003
            15.8065133727148e-003
            19.0563115975734e-003
            7.73168922090732e-003
            -9.04769368017060e-003
            27.0535815258102e-003];
    case 25
        x=[    1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            -979.477618704947e-003
            161.165265742835e-003
            983.326309543679e-003
            -461.370599173529e-003
            -891.892818936448e-003
            571.897080663206e-003
            912.559741385175e-003
            -649.253523752608e-003
            79.8179729527134e-003
            -242.306539857658e-003];
        w=[    2.92871953028662e-003
            3.43223391118726e-003
            28.4757174642539e-003
            86.7767984181816e-003
            60.1196489424261e-003
            45.1858379133772e-003
            37.9770096999676e-003
            92.3683683726682e-003
            112.402878385182e-003
            24.8330833289833e-003
            21.6803368469584e-003
            75.4819864898848e-003
            84.1665570723069e-003
            120.217888034254e-003
            54.0806492359757e-003
            14.1151533798843e-003
            32.8363838565007e-003
            11.1284064320093e-003
            41.3381218928912e-003
            19.0075882932697e-003
            25.0588479471733e-003
            12.5991951707382e-003
            -27.2087986828493e-003
            69.6184781277546e-003
            -48.6210900632656e-003];
    case 26
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            -979.477618704947e-003
            161.165265742835e-003
            983.326309543679e-003
            -461.370599173529e-003
            -891.892818936448e-003
            571.897080663206e-003
            912.559741385175e-003
            -649.253523752608e-003
            79.8179729527134e-003
            -242.306539857658e-003
            722.294386396324e-003];
        w=[3.01245115002362e-003
            3.42638360181058e-003
            26.4075690230848e-003
            87.3497481700106e-003
            57.5147184546717e-003
            45.0941489925530e-003
            39.0569548970486e-003
            93.0035995634520e-003
            113.668487451904e-003
            24.7881877212752e-003
            22.2986501124949e-003
            74.6055418777760e-003
            84.4221612519888e-003
            121.932933424332e-003
            52.1534536905655e-003
            14.1363837286985e-003
            31.1794946957996e-003
            10.8361266647821e-003
            40.7924521996026e-003
            19.0889367440288e-003
            26.6960492842429e-003
            11.5497636041462e-003
            -27.7519722593204e-003
            72.3361795548587e-003
            -50.6887750047053e-003
            3.09037140487418e-003];
    case 27
        x=[ 1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            -979.477618704947e-003
            161.165265742835e-003
            983.326309543679e-003
            -461.370599173529e-003
            -891.892818936448e-003
            571.897080663206e-003
            912.559741385175e-003
            -649.253523752608e-003
            79.8179729527134e-003
            -242.306539857658e-003
            722.294386396324e-003
            -992.668627851310e-003];
        w=[ 2.51060344342718e-003
            -6.10401582203666e-003
            51.2901224379722e-003
            70.8737042445224e-003
            76.3541550297325e-003
            52.2320102400849e-003
            32.1325574739942e-003
            87.1600015912358e-003
            91.1406333588958e-003
            35.5790769417541e-003
            18.5026155474478e-003
            81.7162084887267e-003
            73.5207947086395e-003
            97.4525296487083e-003
            65.1753379213024e-003
            -5.08553085154001e-003
            48.3296358745837e-003
            12.6026950745214e-003
            53.0586274085387e-003
            9.44819324229648e-003
            14.1984723740268e-003
            18.1282293651098e-003
            -8.86176263911917e-003
            42.0721047185917e-003
            -17.7785375055484e-003
            -18.4311739748934e-003
            22.7827116590253e-003];
    case 28
        x=[ 1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            -979.477618704947e-003
            161.165265742835e-003
            983.326309543679e-003
            -461.370599173529e-003
            -891.892818936448e-003
            571.897080663206e-003
            912.559741385175e-003
            -649.253523752608e-003
            79.8179729527134e-003
            -242.306539857658e-003
            722.294386396324e-003
            -992.668627851310e-003
            390.789511390228e-003];
        w=[2.54121662729223e-003
            -6.35867165231393e-003
            53.6563470867355e-003
            70.2412650109674e-003
            73.7409623209168e-003
            52.4476612496497e-003
            32.6695313075648e-003
            84.6104367759320e-003
            89.9656258625978e-003
            35.8797403961009e-003
            18.7536813760903e-003
            78.7344757721713e-003
            73.1536470093003e-003
            95.7886013615009e-003
            63.9153892010030e-003
            -5.60683998137496e-003
            51.1052167400304e-003
            12.4919003552130e-003
            53.5935511710722e-003
            9.16887754448110e-003
            16.7629159283458e-003
            17.6596865849606e-003
            -8.18678498516253e-003
            38.4554196934762e-003
            -15.8467233697257e-003
            -16.0185620965409e-003
            23.3947002401842e-003
            3.28673246953151e-003];
    case 29
        x=[ 1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            -979.477618704947e-003
            161.165265742835e-003
            983.326309543679e-003
            -461.370599173529e-003
            -891.892818936448e-003
            571.897080663206e-003
            912.559741385175e-003
            -649.253523752608e-003
            79.8179729527134e-003
            -242.306539857658e-003
            722.294386396324e-003
            -992.668627851310e-003
            390.789511390228e-003
            -782.130688202367e-003];
        w=[2.64479225817328e-003
            689.008697798140e-006
            71.8980460204765e-003
            51.6195784658873e-003
            62.8052988404612e-003
            29.6848721917906e-003
            34.6292578866784e-003
            70.4776439600455e-003
            74.5779796938273e-003
            24.6090042964657e-003
            19.6263027345904e-003
            64.4831494664219e-003
            41.2974207595292e-003
            79.7661092205717e-003
            59.0361506752608e-003
            10.3208792406504e-003
            68.8468888803028e-003
            12.1135008550474e-003
            63.6489708548883e-003
            24.5126253337737e-003
            28.1826031592904e-003
            15.9926408703622e-003
            22.4418526287037e-003
            13.1555709511146e-003
            5.73080357185976e-003
            -6.34902832419678e-003
            5.86794238929921e-003
            20.1827567815454e-003
            27.5073776393809e-003];
    case 30
        x=[ 1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            -979.477618704947e-003
            161.165265742835e-003
            983.326309543679e-003
            -461.370599173529e-003
            -891.892818936448e-003
            571.897080663206e-003
            912.559741385175e-003
            -649.253523752608e-003
            79.8179729527134e-003
            -242.306539857658e-003
            722.294386396324e-003
            -992.668627851310e-003
            390.789511390228e-003
            -782.130688202367e-003
            994.056752987998e-003];
        w=[ -2.69007691990585e-003
            1.77093742224661e-003
            77.5155588282193e-003
            47.9919709750533e-003
            52.8228616940746e-003
            25.8840345741846e-003
            39.4652997987477e-003
            64.1934482734183e-003
            70.9979713511534e-003
            22.8278375806553e-003
            26.0811916252286e-003
            56.0062315752050e-003
            35.5835780782260e-003
            75.5011379773331e-003
            52.2216765820254e-003
            12.7914589151025e-003
            75.3676170122931e-003
            1.31849575948272e-003
            65.7639185756874e-003
            27.0031528407210e-003
            36.4633104401165e-003
            9.73088988218635e-003
            28.1474099880188e-003
            4.68430623590355e-003
            11.0733158940544e-003
            4.54293540001039e-003
            3.16738311502604e-003
            28.7563870359312e-003
            32.2481637559026e-003
            12.7675957336984e-003];
    case 31
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            0.00000000000000e+000
            -577.350268924798e-003
            658.706590962041e-003
            -839.254168320087e-003
            870.007145536866e-003
            305.613323211388e-003
            -321.707612032865e-003
            -942.979181791534e-003
            952.673270435806e-003
            479.412325065954e-003
            -712.638638732622e-003
            -155.959365691096e-003
            774.872337187640e-003
            -979.477618704947e-003
            161.165265742835e-003
            983.326309543679e-003
            -461.370599173529e-003
            -891.892818936448e-003
            571.897080663206e-003
            912.559741385175e-003
            -649.253523752608e-003
            79.8179729527134e-003
            -242.306539857658e-003
            722.294386396324e-003
            -992.668627851310e-003
            390.789511390228e-003
            -782.130688202367e-003
            994.056752987998e-003
            -397.576893519387e-003];
        w=[-2.49585434987077e-003
            1.86231689841112e-003
            76.7966487540330e-003
            46.9652639077435e-003
            53.3037096001342e-003
            25.4461840283336e-003
            39.2711821920440e-003
            64.6481520011281e-003
            73.3988471937207e-003
            22.6616726963548e-003
            25.8379565696473e-003
            56.4980393119358e-003
            34.6608276855161e-003
            76.3992681878948e-003
            52.5174028707299e-003
            13.0074827144116e-003
            74.7738223545378e-003
            1.71624673083912e-003
            67.4507568266372e-003
            27.2595058232315e-003
            36.0287172546115e-003
            9.97407155207887e-003
            29.3008813582962e-003
            5.58716983248677e-003
            9.32262841958939e-003
            4.04806701039491e-003
            2.93648444565461e-003
            28.2030518653859e-003
            32.8754198585424e-003
            12.3007903708637e-003
            -2.55671396531779e-003];
    otherwise
        error('SparseGKit:OutOfTable','too many points')
end

function [x,w] = sym_line_leja_tab(n)

switch n
    case 1
        x=[0.00000000000000e+000];
        w=[ 1.00000000000000e+000];
    case 2
        x=[0.00000000000000e+000
            1.00000000000000e+000];
        w=[1.00000000000000e+000
            0.00000000000000e+000];
    case 3
        x=[ 0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000];
        w=[666.666666666667e-003
            166.666666666667e-003
            166.666666666667e-003];
    case 4
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003];
        w=[666.666666666667e-003
            166.666666666667e-003
            166.666666666667e-003
            0.00000000000000e+000];
    case 5
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003];
        w=[266.666666296498e-003
            66.6666667129378e-003
            66.6666667129378e-003
            300.000000138813e-003
            300.000000138813e-003];
    case 6
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003];
        w=[266.666666296498e-003
            66.6666667129378e-003
            66.6666667129378e-003
            300.000000138813e-003
            300.000000138813e-003
            -20.2585057847559e-018];
    case 7
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003];
        w=[320.663782561666e-003
            34.3272001916133e-003
            34.3272001916133e-003
            223.230521663261e-003
            223.230521663261e-003
            82.1103868642928e-003
            82.1103868642928e-003];
    case 8
        x=[ 0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003];
        w=[ 320.663782561666e-003
            34.3272001916133e-003
            34.3272001916133e-003
            223.230521663261e-003
            223.230521663261e-003
            82.1103868642929e-003
            82.1103868642928e-003
            21.8104330383956e-018];
    case 9
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003];
        w=[112.006609777036e-003
            24.0176978575187e-003
            24.0176978575187e-003
            135.302788225881e-003
            135.302788225881e-003
            120.536106503513e-003
            120.536106503513e-003
            164.140102524569e-003
            164.140102524569e-003];
    case 10
        x=[ 0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003];
        w=[112.006609777036e-003
            24.0176978575187e-003
            24.0176978575187e-003
            135.302788225881e-003
            135.302788225881e-003
            120.536106503513e-003
            120.536106503513e-003
            164.140102524569e-003
            164.140102524569e-003
            59.7513887882836e-018];
    case 11
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003];
        w=[135.611587750430e-003
            14.6498278064501e-003
            14.6498278064500e-003
            151.213887936189e-003
            151.213887936189e-003
            99.5014307409980e-003
            99.5014307409980e-003
            143.830769965716e-003
            143.830769965716e-003
            22.9982896754310e-003
            22.9982896754309e-003];
    case 12
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003];
        w=[135.611587750430e-003
            14.6498278064501e-003
            14.6498278064501e-003
            151.213887936189e-003
            151.213887936189e-003
            99.5014307409981e-003
            99.5014307409981e-003
            143.830769965716e-003
            143.830769965716e-003
            22.9982896754310e-003
            22.9982896754310e-003
            62.2221891992655e-018];
    case 13
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003];
        w=[109.011770853894e-003
            12.1912179453222e-003
            12.1912179453222e-003
            174.665354942894e-003
            174.665354942894e-003
            90.8337665559106e-003
            90.8337665559106e-003
            182.193590922366e-003
            182.193590922366e-003
            29.9883766198900e-003
            29.9883766198899e-003
            -44.3781924133301e-003
            -44.3781924133302e-003];
    case 14
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003];
        w=[109.011770853895e-003
            12.1912179453222e-003
            12.1912179453222e-003
            174.665354942894e-003
            174.665354942894e-003
            90.8337665559107e-003
            90.8337665559107e-003
            182.193590922366e-003
            182.193590922366e-003
            29.9883766198899e-003
            29.9883766198899e-003
            -44.3781924133303e-003
            -44.3781924133302e-003
            -87.0623648723743e-018];
    case 15
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003];
        w=[145.397206422257e-003
            8.29945665945035e-003
            8.29945665945035e-003
            89.9383860809724e-003
            89.9383860809724e-003
            53.2150733222376e-003
            53.2150733222374e-003
            121.028053732793e-003
            121.028053732793e-003
            44.5248922853596e-003
            44.5248922853596e-003
            49.3227425353838e-003
            49.3227425353837e-003
            60.9727921726746e-003
            60.9727921726747e-003];
    case 16
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003
            -126.793026195453e-003];
        w=[145.397206422257e-003
            8.29945665945034e-003
            8.29945665945036e-003
            89.9383860809723e-003
            89.9383860809724e-003
            53.2150733222375e-003
            53.2150733222375e-003
            121.028053732793e-003
            121.028053732793e-003
            44.5248922853596e-003
            44.5248922853596e-003
            49.3227425353837e-003
            49.3227425353837e-003
            60.9727921726746e-003
            60.9727921726746e-003
            38.9962333002756e-018];
    case 17
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003
            -126.793026195453e-003
            126.793026195453e-003];
        w=[ 72.0453269625097e-003
            8.17126515332111e-003
            8.17126515332113e-003
            81.2830278255200e-003
            81.2830278255202e-003
            51.4466394473611e-003
            51.4466394473610e-003
            88.0624877737807e-003
            88.0624877737808e-003
            45.0644239497300e-003
            45.0644239497301e-003
            66.8939309137969e-003
            66.8939309137968e-003
            64.7703749330167e-003
            64.7703749330168e-003
            58.2851865222184e-003
            58.2851865222184e-003];
    case 18
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003
            -126.793026195453e-003
            126.793026195453e-003
            -980.404010040876e-003];
        w=[ 72.0453269625098e-003
            8.17126515332111e-003
            8.17126515332113e-003
            81.2830278255202e-003
            81.2830278255202e-003
            51.4466394473612e-003
            51.4466394473610e-003
            88.0624877737808e-003
            88.0624877737808e-003
            45.0644239497301e-003
            45.0644239497300e-003
            66.8939309137968e-003
            66.8939309137968e-003
            64.7703749330167e-003
            64.7703749330168e-003
            58.2851865222183e-003
            58.2851865222183e-003
            19.3203342318513e-018];
    case 19
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003
            -126.793026195453e-003
            126.793026195453e-003
            -980.404010040876e-003
            980.404010040876e-003];
        w=[99.6690968863101e-003
            6.97557100234942e-003
            6.97557100234940e-003
            86.2730789950323e-003
            86.2730789950324e-003
            53.9502229732633e-003
            53.9502229732633e-003
            101.546160950800e-003
            101.546160950800e-003
            42.3484521169917e-003
            42.3484521169917e-003
            58.6581525368681e-003
            58.6581525368681e-003
            61.5340715489389e-003
            61.5340715489390e-003
            35.9620538047190e-003
            35.9620538047190e-003
            2.91768762788229e-003
            2.91768762788227e-003];
    case 20
        x=[ 0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003
            -126.793026195453e-003
            126.793026195453e-003
            -980.404010040876e-003
            980.404010040876e-003
            -892.768003953281e-003];
        w=[99.6690968863101e-003
            6.97557100234939e-003
            6.97557100234941e-003
            86.2730789950323e-003
            86.2730789950324e-003
            53.9502229732634e-003
            53.9502229732632e-003
            101.546160950800e-003
            101.546160950800e-003
            42.3484521169917e-003
            42.3484521169917e-003
            58.6581525368681e-003
            58.6581525368681e-003
            61.5340715489390e-003
            61.5340715489390e-003
            35.9620538047190e-003
            35.9620538047190e-003
            2.91768762788226e-003
            2.91768762788226e-003
            -35.0721351812606e-018];
    case 21
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003
            -126.793026195453e-003
            126.793026195453e-003
            -980.404010040876e-003
            980.404010040876e-003
            -892.768003953281e-003
            892.768003953281e-003];
        w=[70.7221553018452e-003
            2.05522889919127e-003
            2.05522889919130e-003
            77.2850682002714e-003
            77.2850682002716e-003
            31.1049045384595e-003
            31.1049045384593e-003
            85.9227500739580e-003
            85.9227500739581e-003
            17.7585826346227e-003
            17.7585826346226e-003
            69.9692801404976e-003
            69.9692801404976e-003
            71.9063315335368e-003
            71.9063315335369e-003
            59.8360050135004e-003
            59.8360050135004e-003
            17.7625278360938e-003
            17.7625278360938e-003
            31.0382434789460e-003
            31.0382434789461e-003];
    case 22
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003
            -126.793026195453e-003
            126.793026195453e-003
            -980.404010040876e-003
            980.404010040876e-003
            -892.768003953281e-003
            892.768003953281e-003
            -653.801815243057e-003];
        w=[70.7221553018451e-003
            2.05522889919127e-003
            2.05522889919130e-003
            77.2850682002715e-003
            77.2850682002716e-003
            31.1049045384594e-003
            31.1049045384593e-003
            85.9227500739581e-003
            85.9227500739581e-003
            17.7585826346226e-003
            17.7585826346226e-003
            69.9692801404975e-003
            69.9692801404976e-003
            71.9063315335369e-003
            71.9063315335369e-003
            59.8360050135004e-003
            59.8360050135003e-003
            17.7625278360938e-003
            17.7625278360938e-003
            31.0382434789461e-003
            31.0382434789461e-003
            -105.370786936064e-018];
    case 23
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003
            -126.793026195453e-003
            126.793026195453e-003
            -980.404010040876e-003
            980.404010040876e-003
            -892.768003953281e-003
            892.768003953281e-003
            -653.801815243057e-003
            653.801815243057e-003];
        w=[ 61.4829751727129e-003
            3.22772131607270e-003
            3.22772131607270e-003
            64.2567427005924e-003
            64.2567427005924e-003
            42.3147613088084e-003
            42.3147613088084e-003
            79.8541693267053e-003
            79.8541693267052e-003
            25.0229722483845e-003
            25.0229722483844e-003
            76.4384335143228e-003
            76.4384335143227e-003
            58.9209675236081e-003
            58.9209675236082e-003
            67.7537910324329e-003
            67.7537910324330e-003
            13.9678695984893e-003
            13.9678695984894e-003
            19.5801030272984e-003
            19.5801030272985e-003
            17.9209808169289e-003
            17.9209808169289e-003];
    case 24
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003
            -126.793026195453e-003
            126.793026195453e-003
            -980.404010040876e-003
            980.404010040876e-003
            -892.768003953281e-003
            892.768003953281e-003
            -653.801815243057e-003
            653.801815243057e-003
            -354.637038960533e-003];
        w=[61.4829751727129e-003
            3.22772131607271e-003
            3.22772131607270e-003
            64.2567427005924e-003
            64.2567427005924e-003
            42.3147613088084e-003
            42.3147613088084e-003
            79.8541693267050e-003
            79.8541693267051e-003
            25.0229722483845e-003
            25.0229722483844e-003
            76.4384335143226e-003
            76.4384335143227e-003
            58.9209675236082e-003
            58.9209675236082e-003
            67.7537910324330e-003
            67.7537910324329e-003
            13.9678695984894e-003
            13.9678695984894e-003
            19.5801030272985e-003
            19.5801030272984e-003
            17.9209808169288e-003
            17.9209808169289e-003
            213.767918173554e-018];
    case 25
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003
            -126.793026195453e-003
            126.793026195453e-003
            -980.404010040876e-003
            980.404010040876e-003
            -892.768003953281e-003
            892.768003953281e-003
            -653.801815243057e-003
            653.801815243057e-003
            -354.637038960533e-003
            354.637038960533e-003];
        w=[53.8703146709059e-003
            3.08874068728928e-003
            3.08874068728928e-003
            70.7610911362637e-003
            70.7610911362636e-003
            40.3110285820960e-003
            40.3110285820959e-003
            67.1643804508931e-003
            67.1643804508932e-003
            24.0370299132390e-003
            24.0370299132390e-003
            65.8208429076855e-003
            65.8208429076856e-003
            62.1976489515777e-003
            62.1976489515775e-003
            75.2338348809675e-003
            75.2338348809675e-003
            14.4385613891973e-003
            14.4385613891973e-003
            21.3489484227851e-003
            21.3489484227851e-003
            11.7653444235731e-003
            11.7653444235733e-003
            16.8973909189797e-003
            16.8973909189795e-003];
    case 26
        x=[ 0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003
            -126.793026195453e-003
            126.793026195453e-003
            -980.404010040876e-003
            980.404010040876e-003
            -892.768003953281e-003
            892.768003953281e-003
            -653.801815243057e-003
            653.801815243057e-003
            -354.637038960533e-003
            354.637038960533e-003
            -992.877986136621e-003];
        w=[53.8703146709059e-003
            3.08874068728927e-003
            3.08874068728921e-003
            70.7610911362637e-003
            70.7610911362636e-003
            40.3110285820960e-003
            40.3110285820959e-003
            67.1643804508932e-003
            67.1643804508933e-003
            24.0370299132391e-003
            24.0370299132390e-003
            65.8208429076857e-003
            65.8208429076857e-003
            62.1976489515776e-003
            62.1976489515776e-003
            75.2338348809675e-003
            75.2338348809674e-003
            14.4385613891972e-003
            14.4385613891973e-003
            21.3489484227850e-003
            21.3489484227851e-003
            11.7653444235732e-003
            11.7653444235733e-003
            16.8973909189796e-003
            16.8973909189794e-003
            145.542787035034e-018];
    case 27
        x=[ 0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003
            -126.793026195453e-003
            126.793026195453e-003
            -980.404010040876e-003
            980.404010040876e-003
            -892.768003953281e-003
            892.768003953281e-003
            -653.801815243057e-003
            653.801815243057e-003
            -354.637038960533e-003
            354.637038960533e-003
            -992.877986136621e-003
            992.877986136621e-003];
        w=[58.0395799316661e-003
            -2.19797038303848e-003
            -2.19797038303860e-003
            65.3789406009346e-003
            65.3789406009347e-003
            44.1705101755205e-003
            44.1705101755205e-003
            74.6965591285552e-003
            74.6965591285552e-003
            29.5519565841931e-003
            29.5519565841930e-003
            73.0142797519478e-003
            73.0142797519480e-003
            58.2608432169590e-003
            58.2608432169591e-003
            71.0692852661896e-003
            71.0692852661896e-003
            4.11433804071092e-003
            4.11433804071097e-003
            16.2899195530055e-003
            16.2899195530055e-003
            17.7175970930239e-003
            17.7175970930240e-003
            6.28981374688352e-003
            6.28981374688338e-003
            12.6241372592817e-003
            12.6241372592816e-003];
    case 28
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003
            -126.793026195453e-003
            126.793026195453e-003
            -980.404010040876e-003
            980.404010040876e-003
            -892.768003953281e-003
            892.768003953281e-003
            -653.801815243057e-003
            653.801815243057e-003
            -354.637038960533e-003
            354.637038960533e-003
            -992.877986136621e-003
            992.877986136621e-003
            -787.305959235997e-003];
        w=[58.0395799316661e-003
            -2.19797038303848e-003
            -2.19797038303853e-003
            65.3789406009346e-003
            65.3789406009346e-003
            44.1705101755203e-003
            44.1705101755204e-003
            74.6965591285552e-003
            74.6965591285552e-003
            29.5519565841930e-003
            29.5519565841931e-003
            73.0142797519480e-003
            73.0142797519481e-003
            58.2608432169589e-003
            58.2608432169591e-003
            71.0692852661896e-003
            71.0692852661895e-003
            4.11433804071109e-003
            4.11433804071096e-003
            16.2899195530056e-003
            16.2899195530055e-003
            17.7175970930240e-003
            17.7175970930240e-003
            6.28981374688347e-003
            6.28981374688336e-003
            12.6241372592815e-003
            12.6241372592816e-003
            274.795258471190e-018];
    case 29
        x=[ 0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003
            -126.793026195453e-003
            126.793026195453e-003
            -980.404010040876e-003
            980.404010040876e-003
            -892.768003953281e-003
            892.768003953281e-003
            -653.801815243057e-003
            653.801815243057e-003
            -354.637038960533e-003
            354.637038960533e-003
            -992.877986136621e-003
            992.877986136621e-003
            -787.305959235997e-003
            787.305959235997e-003];
        w=[ 59.3850306728524e-003
            583.834743131937e-006
            583.834743131933e-006
            61.6214294168999e-003
            61.6214294169000e-003
            35.1573982502380e-003
            35.1573982502381e-003
            77.4679926395377e-003
            77.4679926395377e-003
            25.4576273308324e-003
            25.4576273308325e-003
            76.3532301578351e-003
            76.3532301578352e-003
            48.8203391809502e-003
            48.8203391809504e-003
            69.6895719989152e-003
            69.6895719989152e-003
            10.1644560077820e-003
            10.1644560077820e-003
            22.0012583281602e-003
            22.0012583281601e-003
            23.9060986342132e-003
            23.9060986342131e-003
            1.99532541813508e-003
            1.99532541813498e-003
            5.72383424417829e-003
            5.72383424417834e-003
            11.3650883127645e-003
            11.3650883127642e-003];
    case 30
        x=[0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003
            -126.793026195453e-003
            126.793026195453e-003
            -980.404010040876e-003
            980.404010040876e-003
            -892.768003953281e-003
            892.768003953281e-003
            -653.801815243057e-003
            653.801815243057e-003
            -354.637038960533e-003
            354.637038960533e-003
            -992.877986136621e-003
            992.877986136621e-003
            -787.305959235997e-003
            787.305959235997e-003
            -193.207023391632e-003];
        w=[59.3850306728525e-003
            583.834743131949e-006
            583.834743131919e-006
            61.6214294169000e-003
            61.6214294169000e-003
            35.1573982502380e-003
            35.1573982502381e-003
            77.4679926395376e-003
            77.4679926395377e-003
            25.4576273308325e-003
            25.4576273308325e-003
            76.3532301578351e-003
            76.3532301578352e-003
            48.8203391809502e-003
            48.8203391809504e-003
            69.6895719989152e-003
            69.6895719989152e-003
            10.1644560077820e-003
            10.1644560077820e-003
            22.0012583281602e-003
            22.0012583281601e-003
            23.9060986342131e-003
            23.9060986342131e-003
            1.99532541813512e-003
            1.99532541813495e-003
            5.72383424417831e-003
            5.72383424417832e-003
            11.3650883127645e-003
            11.3650883127643e-003
            97.1606233220442e-018];
    case 31
        x=[ 0.00000000000000e+000
            1.00000000000000e+000
            -1.00000000000000e+000
            -577.350268922479e-003
            577.350268922479e-003
            -839.943480719486e-003
            839.943480719486e-003
            -276.062583588279e-003
            276.062583588279e-003
            -943.018892243908e-003
            943.018892243908e-003
            -434.632833901420e-003
            434.632833901420e-003
            -732.417690451028e-003
            732.417690451028e-003
            -126.793026195453e-003
            126.793026195453e-003
            -980.404010040876e-003
            980.404010040876e-003
            -892.768003953281e-003
            892.768003953281e-003
            -653.801815243057e-003
            653.801815243057e-003
            -354.637038960533e-003
            354.637038960533e-003
            -992.877986136621e-003
            992.877986136621e-003
            -787.305959235997e-003
            787.305959235997e-003
            -193.207023391632e-003
            193.207023391632e-003];
        w=[ 48.7025101338323e-003
            1.44028185028310e-003
            1.44028185028307e-003
            57.8591252862780e-003
            57.8591252862780e-003
            31.1594645980774e-003
            31.1594645980775e-003
            98.5937424530627e-003
            98.5937424530628e-003
            24.0332747177972e-003
            24.0332747177972e-003
            82.8819666649949e-003
            82.8819666649949e-003
            43.2143336863193e-003
            43.2143336863195e-003
            88.9307177314094e-003
            88.9307177314095e-003
            12.1053775916335e-003
            12.1053775916335e-003
            24.2294074792595e-003
            24.2294074792595e-003
            28.6075320725778e-003
            28.6075320725778e-003
            -12.3967005080870e-003
            -12.3967005080872e-003
            3.56761572093946e-003
            3.56761572093946e-003
            17.1475457601424e-003
            17.1475457601423e-003
            -25.7249401716039e-003
            -25.7249401716040e-003];
    otherwise
        error('SparseGKit:OutOfTable','too many points')
end

function [x,w] = p_disk_leja_tab(n)

switch n
    case 1
        x=1.00000000000000e+000;
        w=1.00000000000000e+000;
    case 2
        x=[1.00000000000000e+000
            -1.00000000000000e+000];
        w=[ 500.000000000000e-003
            500.000000000000e-003];
    case 3
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018];
        w=[166.666666666667e-003
            166.666666666667e-003
            666.666666666667e-003];
    case 4
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003];
        w=[166.666666666667e-003
            166.666666666667e-003
            666.666666666667e-003
            -185.172506393205e-018];
    case 5
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003];
        w=[33.3333333333334e-003
            33.3333333333332e-003
            400.000000000000e-003
            266.666666666667e-003
            266.666666666667e-003];
    case 6
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003];
        w=[33.3333333333328e-003
            33.3333333333333e-003
            400.000000000000e-003
            266.666666666666e-003
            266.666666666667e-003
            836.938662736039e-018];
    case 7
        x=[ 1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003];
        w=[98.3659726166301e-003
            98.3659726166307e-003
            377.684326185642e-003
            320.541469042784e-003
            320.541469042785e-003
            -107.749604752235e-003
            -107.749604752236e-003];
    case 8
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003];
        w=[ 98.3659726166303e-003
            98.3659726166304e-003
            377.684326185642e-003
            320.541469042785e-003
            320.541469042784e-003
            -107.749604752236e-003
            -107.749604752236e-003
            382.680092170924e-018];
    case 9
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003];
        w=[7.93650793650786e-003
            7.93650793650794e-003
            196.825396825397e-003
            139.682539682540e-003
            139.682539682540e-003
            73.1093246080092e-003
            73.1093246080090e-003
            180.858929360245e-003
            180.858929360245e-003];
    case 10
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003];
        w=[7.93650793650926e-003
            7.93650793650790e-003
            196.825396825397e-003
            139.682539682539e-003
            139.682539682540e-003
            73.1093246080101e-003
            73.1093246080090e-003
            180.858929360245e-003
            180.858929360245e-003
            -2.14563555444253e-015];
    case 11
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003];
        w=[15.5192330069527e-003
            15.5192330069514e-003
            196.225358655182e-003
            138.433024877007e-003
            138.433024877007e-003
            78.4347225067142e-003
            78.4347225067132e-003
            181.566722641345e-003
            181.566722641345e-003
            -12.0663823596100e-003
            -12.0663823596080e-003];
    case 12
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003];
        w=[15.5192330069523e-003
            15.5192330069520e-003
            196.225358655183e-003
            138.433024877007e-003
            138.433024877007e-003
            78.4347225067140e-003
            78.4347225067136e-003
            181.566722641345e-003
            181.566722641345e-003
            -12.0663823596095e-003
            -12.0663823596089e-003
            -287.112647055173e-018];
    case 13
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003];
        w=[18.2447118322289e-003
            18.2447118322285e-003
            201.676316305736e-003
            137.497788400015e-003
            137.497788400015e-003
            80.6925830934945e-003
            80.6925830934941e-003
            183.824583228125e-003
            183.824583228125e-003
            -16.5821035331705e-003
            -16.5821035331699e-003
            -4.51572117356128e-003
            -4.51572117356098e-003];
    case 14
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003];
        w=[18.2447118322286e-003
            18.2447118322287e-003
            201.676316305736e-003
            137.497788400015e-003
            137.497788400015e-003
            80.6925830934941e-003
            80.6925830934942e-003
            183.824583228126e-003
            183.824583228126e-003
            -16.5821035331699e-003
            -16.5821035331701e-003
            -4.51572117356151e-003
            -4.51572117356153e-003
            -506.179316465127e-018];
    case 15
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003];
        w=[29.1871724591982e-003
            29.1871724591982e-003
            152.657839201891e-003
            123.931010475062e-003
            123.931010475062e-003
            92.1939420625214e-003
            92.1939420625214e-003
            145.189668409192e-003
            145.189668409192e-003
            -35.7684248723427e-003
            -35.7684248723428e-003
            41.8041560155176e-003
            41.8041560155175e-003
            27.1335558499059e-003
            27.1335558499064e-003];
    case 16
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003
            -831.469612302545e-003];
        w=[29.1871724591982e-003
            29.1871724591982e-003
            152.657839201890e-003
            123.931010475062e-003
            123.931010475062e-003
            92.1939420625214e-003
            92.1939420625214e-003
            145.189668409192e-003
            145.189668409192e-003
            -35.7684248723427e-003
            -35.7684248723428e-003
            41.8041560155175e-003
            41.8041560155175e-003
            27.1335558499059e-003
            27.1335558499064e-003
            26.1191188083030e-018];
    case 17
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003
            -831.469612302545e-003
            831.469612302545e-003];
        w=[1.96078431372549e-003
            1.96078431372551e-003
            98.2050629109453e-003
            69.4782341841168e-003
            69.4782341841166e-003
            37.7411657715758e-003
            37.7411657715758e-003
            90.7368921182466e-003
            90.7368921182467e-003
            18.6843514186028e-003
            18.6843514186028e-003
            96.2569323064629e-003
            96.2569323064629e-003
            81.5863321408515e-003
            81.5863321408517e-003
            54.4527762909454e-003
            54.4527762909455e-003];
    case 18
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003
            -831.469612302545e-003
            831.469612302545e-003
            995.184726672197e-003];
        w=[ 1.96078431372412e-003
            1.96078431372550e-003
            98.2050629109453e-003
            69.4782341841167e-003
            69.4782341841166e-003
            37.7411657715760e-003
            37.7411657715759e-003
            90.7368921182466e-003
            90.7368921182467e-003
            18.6843514186019e-003
            18.6843514186028e-003
            96.2569323064629e-003
            96.2569323064629e-003
            81.5863321408514e-003
            81.5863321408517e-003
            54.4527762909455e-003
            54.4527762909454e-003
            2.14409039066891e-015];
    case 19
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003
            -831.469612302545e-003
            831.469612302545e-003
            995.184726672197e-003
            -995.184726672197e-003];
        w=[3.61335030435439e-003
            3.61335030435579e-003
            98.1730012913044e-003
            69.4134828205725e-003
            69.4134828205724e-003
            37.5091154481783e-003
            37.5091154481781e-003
            90.6992669728386e-003
            90.6992669728388e-003
            19.8003579136018e-003
            19.8003579136027e-003
            96.2902752777928e-003
            96.2902752777929e-003
            81.6329098024108e-003
            81.6329098024112e-003
            54.5589575115161e-003
            54.5589575115160e-003
            -2.60421669691782e-003
            -2.60421669691997e-003];
    case 20
        x=[ 1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003
            -831.469612302545e-003
            831.469612302545e-003
            995.184726672197e-003
            -995.184726672197e-003
            -98.0171403295606e-003];
        w=[3.61335030435527e-003
            3.61335030435472e-003
            98.1730012913043e-003
            69.4134828205725e-003
            69.4134828205725e-003
            37.5091154481781e-003
            37.5091154481783e-003
            90.6992669728388e-003
            90.6992669728387e-003
            19.8003579136024e-003
            19.8003579136020e-003
            96.2902752777926e-003
            96.2902752777929e-003
            81.6329098024109e-003
            81.6329098024111e-003
            54.5589575115160e-003
            54.5589575115160e-003
            -2.60421669691919e-003
            -2.60421669691827e-003
            317.161407964964e-018];
    case 21
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003
            -831.469612302545e-003
            831.469612302545e-003
            995.184726672197e-003
            -995.184726672197e-003
            -98.0171403295606e-003
            98.0171403295601e-003];
        w=[3.71606146744627e-003
            3.71606146744570e-003
            98.3784236174862e-003
            69.4053550541311e-003
            69.4053550541310e-003
            37.4921902507348e-003
            37.4921902507350e-003
            90.6823417753955e-003
            90.6823417753955e-003
            19.8724926418191e-003
            19.8724926418186e-003
            96.3624100060093e-003
            96.3624100060096e-003
            81.6424971566212e-003
            81.6424971566214e-003
            54.5685448657263e-003
            54.5685448657264e-003
            -2.76766086177319e-003
            -2.76766086177225e-003
            -163.444164853632e-006
            -163.444164853952e-006];
    case 22
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003
            -831.469612302545e-003
            831.469612302545e-003
            995.184726672197e-003
            -995.184726672197e-003
            -98.0171403295606e-003
            98.0171403295601e-003
            634.393284163645e-003];
        w=[3.71606146744621e-003
            3.71606146744570e-003
            98.3784236174864e-003
            69.4053550541312e-003
            69.4053550541311e-003
            37.4921902507349e-003
            37.4921902507350e-003
            90.6823417753955e-003
            90.6823417753955e-003
            19.8724926418191e-003
            19.8724926418186e-003
            96.3624100060095e-003
            96.3624100060096e-003
            81.6424971566214e-003
            81.6424971566214e-003
            54.5685448657263e-003
            54.5685448657264e-003
            -2.76766086177305e-003
            -2.76766086177222e-003
            -163.444164853752e-006
            -163.444164854068e-006
            -63.2606495048095e-018];
    case 23
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003
            -831.469612302545e-003
            831.469612302545e-003
            995.184726672197e-003
            -995.184726672197e-003
            -98.0171403295606e-003
            98.0171403295601e-003
            634.393284163645e-003
            -634.393284163646e-003];
        w=[3.90871555768706e-003
            3.90871555768659e-003
            97.8063369721366e-003
            69.3119658216971e-003
            69.3119658216971e-003
            37.4501375752653e-003
            37.4501375752654e-003
            90.7564405691179e-003
            90.7564405691179e-003
            20.0169991242042e-003
            20.0169991242038e-003
            96.1405373503167e-003
            96.1405373503170e-003
            81.5279344659862e-003
            81.5279344659864e-003
            54.6057413830537e-003
            54.6057413830538e-003
            -3.07924070688929e-003
            -3.07924070688849e-003
            302.868026877631e-006
            302.868026877344e-006
            154.732346615065e-006
            154.732346615138e-006];
    case 24
        x=[ 1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003
            -831.469612302545e-003
            831.469612302545e-003
            995.184726672197e-003
            -995.184726672197e-003
            -98.0171403295606e-003
            98.0171403295601e-003
            634.393284163645e-003
            -634.393284163646e-003
            -773.010453362737e-003];
        w=[3.90871555768702e-003
            3.90871555768707e-003
            97.8063369721370e-003
            69.3119658216972e-003
            69.3119658216979e-003
            37.4501375752653e-003
            37.4501375752652e-003
            90.7564405691179e-003
            90.7564405691179e-003
            20.0169991242041e-003
            20.0169991242041e-003
            96.1405373503169e-003
            96.1405373503171e-003
            81.5279344659863e-003
            81.5279344659868e-003
            54.6057413830540e-003
            54.6057413830538e-003
            -3.07924070688921e-003
            -3.07924070688932e-003
            302.868026877235e-006
            302.868026877013e-006
            154.732346615018e-006
            154.732346614446e-006
            -733.720841265764e-018];
    case 25
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003
            -831.469612302545e-003
            831.469612302545e-003
            995.184726672197e-003
            -995.184726672197e-003
            -98.0171403295606e-003
            98.0171403295601e-003
            634.393284163645e-003
            -634.393284163646e-003
            -773.010453362737e-003
            773.010453362737e-003];
        w=[4.26714219453118e-003
            4.26714219453123e-003
            98.5231902458253e-003
            70.0288190953855e-003
            70.0288190953862e-003
            37.3271449979635e-003
            37.3271449979634e-003
            90.6334479918160e-003
            90.6334479918160e-003
            20.3139294723974e-003
            20.3139294723974e-003
            96.4374676985101e-003
            96.4374676985103e-003
            81.8248648141796e-003
            81.8248648141799e-003
            54.9026717312473e-003
            54.9026717312470e-003
            -3.67310140327573e-003
            -3.67310140327581e-003
            -290.992669509290e-006
            -290.992669509497e-006
            -439.128349771510e-006
            -439.128349772013e-006
            -593.860696387237e-006
            -593.860696386534e-006];
    case 26
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003
            -831.469612302545e-003
            831.469612302545e-003
            995.184726672197e-003
            -995.184726672197e-003
            -98.0171403295606e-003
            98.0171403295601e-003
            634.393284163645e-003
            -634.393284163646e-003
            -773.010453362737e-003
            773.010453362737e-003
            881.921264348355e-003];
        w=[ 4.26714219453175e-003
            4.26714219453119e-003
            98.5231902458252e-003
            70.0288190953847e-003
            70.0288190953861e-003
            37.3271449979629e-003
            37.3271449979634e-003
            90.6334479918160e-003
            90.6334479918161e-003
            20.3139294723979e-003
            20.3139294723973e-003
            96.4374676985101e-003
            96.4374676985102e-003
            81.8248648141794e-003
            81.8248648141799e-003
            54.9026717312473e-003
            54.9026717312459e-003
            -3.67310140327670e-003
            -3.67310140327575e-003
            -290.992669509161e-006
            -290.992669509382e-006
            -439.128349771065e-006
            -439.128349771964e-006
            -593.860696387172e-006
            -593.860696385504e-006
            948.445719490695e-018];
    case 27
        x=[ 1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003
            -831.469612302545e-003
            831.469612302545e-003
            995.184726672197e-003
            -995.184726672197e-003
            -98.0171403295606e-003
            98.0171403295601e-003
            634.393284163645e-003
            -634.393284163646e-003
            -773.010453362737e-003
            773.010453362737e-003
            881.921264348355e-003
            -881.921264348355e-003];
        w=[ 5.23854410325007e-003
            5.23854410324959e-003
            97.9681270094993e-003
            68.4746684289981e-003
            68.4746684289994e-003
            36.3495401950285e-003
            36.3495401950289e-003
            90.7507724189192e-003
            90.7507724189193e-003
            21.2849842238678e-003
            21.2849842238673e-003
            96.1957234341122e-003
            96.1957234341123e-003
            81.4436795244473e-003
            81.4436795244477e-003
            52.8339857822449e-003
            52.8339857822437e-003
            -5.35530196265285e-003
            -5.35530196265200e-003
            174.587714923017e-006
            174.587714922849e-006
            513.761722533107e-006
            513.761722532279e-006
            1.39043015791521e-003
            1.39043015791673e-003
            1.72056075166343e-003
            1.72056075166255e-003];
    case 28
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003
            -831.469612302545e-003
            831.469612302545e-003
            995.184726672197e-003
            -995.184726672197e-003
            -98.0171403295606e-003
            98.0171403295601e-003
            634.393284163645e-003
            -634.393284163646e-003
            -773.010453362737e-003
            773.010453362737e-003
            881.921264348355e-003
            -881.921264348355e-003
            -471.396736825998e-003];
        w=[ 5.23854410324997e-003
            5.23854410324993e-003
            97.9681270094996e-003
            68.4746684289983e-003
            68.4746684289981e-003
            36.3495401950286e-003
            36.3495401950285e-003
            90.7507724189190e-003
            90.7507724189194e-003
            21.2849842238677e-003
            21.2849842238677e-003
            96.1957234341125e-003
            96.1957234341124e-003
            81.4436795244473e-003
            81.4436795244468e-003
            52.8339857822438e-003
            52.8339857822440e-003
            -5.35530196265263e-003
            -5.35530196265261e-003
            174.587714922751e-006
            174.587714922641e-006
            513.761722532955e-006
            513.761722533411e-006
            1.39043015791648e-003
            1.39043015791645e-003
            1.72056075166320e-003
            1.72056075166338e-003
            563.440633817344e-018];
    case 29
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003
            -831.469612302545e-003
            831.469612302545e-003
            995.184726672197e-003
            -995.184726672197e-003
            -98.0171403295606e-003
            98.0171403295601e-003
            634.393284163645e-003
            -634.393284163646e-003
            -773.010453362737e-003
            773.010453362737e-003
            881.921264348355e-003
            -881.921264348355e-003
            -471.396736825998e-003
            471.396736825998e-003];
        w=[5.94408693810879e-003
            5.94408693810878e-003
            99.3792126792173e-003
            65.3140780942184e-003
            65.3140780942182e-003
            35.4747878624975e-003
            35.4747878624974e-003
            89.8760200863878e-003
            89.8760200863881e-003
            22.0265634434206e-003
            22.0265634434206e-003
            96.9373026536653e-003
            96.9373026536653e-003
            78.9525956398322e-003
            78.9525956398317e-003
            50.3429018976287e-003
            50.3429018976287e-003
            -6.59238857503567e-003
            -6.59238857503563e-003
            -1.06249889746026e-003
            -1.06249889746039e-003
            3.50035299997822e-003
            3.50035299997869e-003
            4.37702143536177e-003
            4.37702143536171e-003
            3.47006541672545e-003
            3.47006541672566e-003
            1.74950466506284e-003
            1.74950466506224e-003];
    case 30
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003
            -831.469612302545e-003
            831.469612302545e-003
            995.184726672197e-003
            -995.184726672197e-003
            -98.0171403295606e-003
            98.0171403295601e-003
            634.393284163645e-003
            -634.393284163646e-003
            -773.010453362737e-003
            773.010453362737e-003
            881.921264348355e-003
            -881.921264348355e-003
            -471.396736825998e-003
            471.396736825998e-003
            290.284677254462e-003];
        w=[ 5.94408693810881e-003
            5.94408693810878e-003
            99.3792126792172e-003
            65.3140780942184e-003
            65.3140780942181e-003
            35.4747878624975e-003
            35.4747878624974e-003
            89.8760200863879e-003
            89.8760200863881e-003
            22.0265634434206e-003
            22.0265634434206e-003
            96.9373026536653e-003
            96.9373026536653e-003
            78.9525956398321e-003
            78.9525956398317e-003
            50.3429018976287e-003
            50.3429018976288e-003
            -6.59238857503567e-003
            -6.59238857503563e-003
            -1.06249889746024e-003
            -1.06249889746034e-003
            3.50035299997825e-003
            3.50035299997869e-003
            4.37702143536177e-003
            4.37702143536177e-003
            3.47006541672546e-003
            3.47006541672565e-003
            1.74950466506284e-003
            1.74950466506229e-003
            82.1748220988056e-018];
    case 31
        x=[1.00000000000000e+000
            -1.00000000000000e+000
            61.2323399573677e-018
            707.106781186548e-003
            -707.106781186548e-003
            923.879532511287e-003
            -923.879532511287e-003
            -382.683432365090e-003
            382.683432365090e-003
            980.785280403230e-003
            -980.785280403230e-003
            -195.090322016128e-003
            195.090322016128e-003
            555.570233019602e-003
            -555.570233019602e-003
            -831.469612302545e-003
            831.469612302545e-003
            995.184726672197e-003
            -995.184726672197e-003
            -98.0171403295606e-003
            98.0171403295601e-003
            634.393284163645e-003
            -634.393284163646e-003
            -773.010453362737e-003
            773.010453362737e-003
            881.921264348355e-003
            -881.921264348355e-003
            -471.396736825998e-003
            471.396736825998e-003
            290.284677254462e-003
            -290.284677254462e-003];
        w=[7.60323772258311e-003
            7.60323772258310e-003
            63.3182472295008e-003
            48.9427461538346e-003
            48.9427461538342e-003
            33.0261292956405e-003
            33.0261292956403e-003
            59.5820147724772e-003
            59.5820147724774e-003
            23.8460809049574e-003
            23.8460809049574e-003
            62.3751213113607e-003
            62.3751213113610e-003
            55.0463671660862e-003
            55.0463671660860e-003
            41.5064664906068e-003
            41.5064664906069e-003
            -9.53235935713930e-003
            -9.53235935713927e-003
            34.6201357654112e-003
            34.6201357654110e-003
            23.7129418820773e-003
            23.7129418820777e-003
            16.9070964340304e-003
            16.9070964340304e-003
            8.90242308025895e-003
            8.90242308025912e-003
            29.0598108822971e-003
            29.0598108822966e-003
            32.7426638807676e-003
            32.7426638807677e-003];
    otherwise
        error('SparseGKit:OutOfTable','too many points')
end
