Average Error: 0.0 → 0.0
Time: 2.1s
Precision: 64
\[2 \cdot \left(x \cdot x - x \cdot y\right)\]
\[2 \cdot \left(x \cdot x - x \cdot y\right)\]
2 \cdot \left(x \cdot x - x \cdot y\right)
2 \cdot \left(x \cdot x - x \cdot y\right)
double f(double x, double y) {
        double r530865 = 2.0;
        double r530866 = x;
        double r530867 = r530866 * r530866;
        double r530868 = y;
        double r530869 = r530866 * r530868;
        double r530870 = r530867 - r530869;
        double r530871 = r530865 * r530870;
        return r530871;
}

double f(double x, double y) {
        double r530872 = 2.0;
        double r530873 = x;
        double r530874 = r530873 * r530873;
        double r530875 = y;
        double r530876 = r530873 * r530875;
        double r530877 = r530874 - r530876;
        double r530878 = r530872 * r530877;
        return r530878;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[\left(x \cdot 2\right) \cdot \left(x - y\right)\]

Derivation

  1. Initial program 0.0

    \[2 \cdot \left(x \cdot x - x \cdot y\right)\]
  2. Final simplification0.0

    \[\leadsto 2 \cdot \left(x \cdot x - x \cdot y\right)\]

Reproduce

herbie shell --seed 2020024 
(FPCore (x y)
  :name "Linear.Matrix:fromQuaternion from linear-1.19.1.3, A"
  :precision binary64

  :herbie-target
  (* (* x 2) (- x y))

  (* 2 (- (* x x) (* x y))))