Average Error: 0.0 → 0.0
Time: 3.3s
Precision: 64
\[2 \cdot \left(x \cdot x - x \cdot y\right)\]
\[\left(x \cdot \left(x - y\right)\right) \cdot 2\]
2 \cdot \left(x \cdot x - x \cdot y\right)
\left(x \cdot \left(x - y\right)\right) \cdot 2
double f(double x, double y) {
        double r454949 = 2.0;
        double r454950 = x;
        double r454951 = r454950 * r454950;
        double r454952 = y;
        double r454953 = r454950 * r454952;
        double r454954 = r454951 - r454953;
        double r454955 = r454949 * r454954;
        return r454955;
}

double f(double x, double y) {
        double r454956 = x;
        double r454957 = y;
        double r454958 = r454956 - r454957;
        double r454959 = r454956 * r454958;
        double r454960 = 2.0;
        double r454961 = r454959 * r454960;
        return r454961;
}

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 \left(x \cdot \left(x - y\right)\right) \cdot 2\]

Reproduce

herbie shell --seed 2019294 
(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))))