Average Error: 0.0 → 0.0
Time: 7.1s
Precision: 64
\[2 \cdot \left(x \cdot x - x \cdot y\right)\]
\[\left(x - y\right) \cdot \left(2 \cdot x\right)\]
2 \cdot \left(x \cdot x - x \cdot y\right)
\left(x - y\right) \cdot \left(2 \cdot x\right)
double f(double x, double y) {
        double r448513 = 2.0;
        double r448514 = x;
        double r448515 = r448514 * r448514;
        double r448516 = y;
        double r448517 = r448514 * r448516;
        double r448518 = r448515 - r448517;
        double r448519 = r448513 * r448518;
        return r448519;
}

double f(double x, double y) {
        double r448520 = x;
        double r448521 = y;
        double r448522 = r448520 - r448521;
        double r448523 = 2.0;
        double r448524 = r448523 * r448520;
        double r448525 = r448522 * r448524;
        return r448525;
}

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. Simplified0.0

    \[\leadsto \color{blue}{\left(2 \cdot x\right) \cdot \left(x - y\right)}\]
  3. Final simplification0.0

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

Reproduce

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

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

  (* 2.0 (- (* x x) (* x y))))