Average Error: 0.0 → 0.0
Time: 7.4s
Precision: 64
\[2.0 \cdot \left(x \cdot x - x \cdot y\right)\]
\[\left(x - y\right) \cdot \left(2.0 \cdot x\right)\]
2.0 \cdot \left(x \cdot x - x \cdot y\right)
\left(x - y\right) \cdot \left(2.0 \cdot x\right)
double f(double x, double y) {
        double r25142370 = 2.0;
        double r25142371 = x;
        double r25142372 = r25142371 * r25142371;
        double r25142373 = y;
        double r25142374 = r25142371 * r25142373;
        double r25142375 = r25142372 - r25142374;
        double r25142376 = r25142370 * r25142375;
        return r25142376;
}

double f(double x, double y) {
        double r25142377 = x;
        double r25142378 = y;
        double r25142379 = r25142377 - r25142378;
        double r25142380 = 2.0;
        double r25142381 = r25142380 * r25142377;
        double r25142382 = r25142379 * r25142381;
        return r25142382;
}

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

Derivation

  1. Initial program 0.0

    \[2.0 \cdot \left(x \cdot x - x \cdot y\right)\]
  2. Simplified0.0

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

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

Reproduce

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