                               float2x2 matrix) {
        float2 d0 = matrix * (fma(float2(-2), p1, p2) + p0);
        float2 d1 = matrix * (fma(float2(-2), p2, p3) + p1);
        return max(dot(d0,d0), dot(d1,d1));
    }
    float wangs_formula_cubic(float _precision_, float2 p0, float2 p1, float2 p2, float2 p3,
                              float2x2 matrix) {
        float m = wangs_formula_max_fdiff_pow2(p0, p1, p2, p3, matrix);
        return max(ceil(sqrt(%f * _precision_ * sqrt(m))), 1.0);
    }
    float wangs_formula_cubic_log2(float _precision_, float2 p0, float2 p1, float2 p2, float2 p3,
                                   float2x2 matrix) {
        float m = wangs_formula_max_fdiff_pow2(p0, p1, p2, p3, matrix);
        return ceil(log2(max(%f * _precision_ * _precision_ * m, 1.0)) * .25);
    }