/ synthesis
    var A = [];
    var B = [];

    A[0] = [];
    for(var j = 0; j < synthesis_n-1; ++j)
        A[0][j+1] = Math.pow(synthesis_xs[1], j) * (j+1);
    A[0][0] = 0.0;
    B[0] = (synthesis_ys[1] - synthesis_ys[0]) / (synthesis_xs[1] - synthesis_xs[0]);

    for(var i = 1; i < synthesis_n-1; ++i){
        A[i] = [];
        for(var j = 0; j < synthesis_n; ++j){
            A[i][j] = Math.pow(synthesis_xs[i], j);
        }
        B[i] = synthesis_ys[i];
    }

    A[synthesis_n-1] = [];
    for(