xt);

    // polynomial
    var A = [];
    var B = [];
    for(var i = 0; i < polynomial_n; ++i){
        A[i] = [];
        for(var j = 0; j < polynomial_n; ++j){
            A[i][j] = Math.pow(polynomial_xs[i], j);
        }
        B[i] = polynomial_ys[i];
    }

    X = solved_linear(A, B, polynomial_n);

    if(!points_ok()) {
        X = [Number.NaN, Number.NaN, Number.NaN];
    }

    polynomial_system = document.getElementById("polynomial_system");
    polynomial_system.innerHTML = "P(x<sub>1</sub>