Average Error: 0.0 → 0.0
Time: 3.2s
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 r319548 = 2.0;
        double r319549 = x;
        double r319550 = r319549 * r319549;
        double r319551 = y;
        double r319552 = r319549 * r319551;
        double r319553 = r319550 + r319552;
        double r319554 = r319548 * r319553;
        return r319554;
}

double f(double x, double y) {
        double r319555 = 2.0;
        double r319556 = x;
        double r319557 = r319556 * r319556;
        double r319558 = y;
        double r319559 = r319556 * r319558;
        double r319560 = r319557 + r319559;
        double r319561 = r319555 * r319560;
        return r319561;
}

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 2019208 
(FPCore (x y)
  :name "Linear.Matrix:fromQuaternion from linear-1.19.1.3, B"
  :precision binary64

  :herbie-target
  (* (* x 2) (+ x y))

  (* 2 (+ (* x x) (* x y))))