 = 0.;
			for (var b_j = j+1; b_j < n; ++b_j){
				A[i+1][b_j] -= A[j][b_j]*r;
			}
			B[i+1] -= B[j]*r;
		}

	// calculate xs
	X[n-1] = B[n-1] / underflow_padded(A[n-1][n-1]);
	for (var i = n-2; i >= 0; --i){
		var s = 0.0;
		for (var j = i; j < n; ++j){
			s = s + A[i][j]*X[j];
		}
		X[i] = (B[i] - s) / underflow_padded(A[i][i]);
	}
	return X;
}

function approximation_of(points, n) {
	const N = points.length;
	var A = [];
	var B = [];

	for (var i = 0; i < n; ++i){
		var Ai = []
		for (var j = 0; j < n; 