// pixel-size input error is ok, so we don't want much precision anyway
        return 1.e-5 * sign_0_positive(x);
    return x;
}

function solved_linear(A, B, n){
    var X = [];
    for (var i = 0; i < n; ++i)
        X[i] = 0.0;

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