Average Error: 0.0 → 0.0
Time: 7.3s
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 r425356 = 2.0;
        double r425357 = x;
        double r425358 = r425357 * r425357;
        double r425359 = y;
        double r425360 = r425357 * r425359;
        double r425361 = r425358 - r425360;
        double r425362 = r425356 * r425361;
        return r425362;
}

double f(double x, double y) {
        double r425363 = x;
        double r425364 = y;
        double r425365 = r425363 - r425364;
        double r425366 = 2.0;
        double r425367 = r425366 * r425363;
        double r425368 = r425365 * r425367;
        return r425368;
}

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))))