Average Error: 0.0 → 0.0
Time: 14.3s
Precision: 64
\[2 \cdot \left(x \cdot x + x \cdot y\right)\]
\[\left(x \cdot x + y \cdot x\right) \cdot 2\]
2 \cdot \left(x \cdot x + x \cdot y\right)
\left(x \cdot x + y \cdot x\right) \cdot 2
double f(double x, double y) {
        double r26600748 = 2.0;
        double r26600749 = x;
        double r26600750 = r26600749 * r26600749;
        double r26600751 = y;
        double r26600752 = r26600749 * r26600751;
        double r26600753 = r26600750 + r26600752;
        double r26600754 = r26600748 * r26600753;
        return r26600754;
}

double f(double x, double y) {
        double r26600755 = x;
        double r26600756 = r26600755 * r26600755;
        double r26600757 = y;
        double r26600758 = r26600757 * r26600755;
        double r26600759 = r26600756 + r26600758;
        double r26600760 = 2.0;
        double r26600761 = r26600759 * r26600760;
        return r26600761;
}

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

Reproduce

herbie shell --seed 2019179 
(FPCore (x y)
  :name "Linear.Matrix:fromQuaternion from linear-1.19.1.3, B"

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

  (* 2.0 (+ (* x x) (* x y))))