Average Error: 0.0 → 0.0
Time: 833.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 r653359 = 2.0;
        double r653360 = x;
        double r653361 = r653360 * r653360;
        double r653362 = y;
        double r653363 = r653360 * r653362;
        double r653364 = r653361 + r653363;
        double r653365 = r653359 * r653364;
        return r653365;
}

double f(double x, double y) {
        double r653366 = 2.0;
        double r653367 = x;
        double r653368 = r653367 * r653367;
        double r653369 = y;
        double r653370 = r653367 * r653369;
        double r653371 = r653368 + r653370;
        double r653372 = r653366 * r653371;
        return r653372;
}

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, B"
  :precision binary64

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

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