Average Error: 0.0 → 0.0
Time: 861.0ms
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 r563478 = 2.0;
        double r563479 = x;
        double r563480 = r563479 * r563479;
        double r563481 = y;
        double r563482 = r563479 * r563481;
        double r563483 = r563480 - r563482;
        double r563484 = r563478 * r563483;
        return r563484;
}

double f(double x, double y) {
        double r563485 = 2.0;
        double r563486 = x;
        double r563487 = r563486 * r563486;
        double r563488 = y;
        double r563489 = r563486 * r563488;
        double r563490 = r563487 - r563489;
        double r563491 = r563485 * r563490;
        return r563491;
}

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