Average Error: 0.0 → 0.0
Time: 5.1s
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 r1133429 = 2.0;
        double r1133430 = x;
        double r1133431 = r1133430 * r1133430;
        double r1133432 = y;
        double r1133433 = r1133430 * r1133432;
        double r1133434 = r1133431 - r1133433;
        double r1133435 = r1133429 * r1133434;
        return r1133435;
}

double f(double x, double y) {
        double r1133436 = 2.0;
        double r1133437 = x;
        double r1133438 = r1133437 * r1133437;
        double r1133439 = y;
        double r1133440 = r1133437 * r1133439;
        double r1133441 = r1133438 - r1133440;
        double r1133442 = r1133436 * r1133441;
        return r1133442;
}

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