Average Error: 0.0 → 0
Time: 10.8s
Precision: 64
\[\left(x + y\right) + x\]
\[y + 2 \cdot x\]
\left(x + y\right) + x
y + 2 \cdot x
double f(double x, double y) {
        double r27359653 = x;
        double r27359654 = y;
        double r27359655 = r27359653 + r27359654;
        double r27359656 = r27359655 + r27359653;
        return r27359656;
}

double f(double x, double y) {
        double r27359657 = y;
        double r27359658 = 2.0;
        double r27359659 = x;
        double r27359660 = r27359658 * r27359659;
        double r27359661 = r27359657 + r27359660;
        return r27359661;
}

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
Herbie0
\[y + 2 \cdot x\]

Derivation

  1. Initial program 0.0

    \[\left(x + y\right) + x\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt31.9

    \[\leadsto \color{blue}{\sqrt{\left(x + y\right) + x} \cdot \sqrt{\left(x + y\right) + x}}\]
  4. Taylor expanded around 0 0

    \[\leadsto \color{blue}{2 \cdot x + y}\]
  5. Final simplification0

    \[\leadsto y + 2 \cdot x\]

Reproduce

herbie shell --seed 2019163 
(FPCore (x y)
  :name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, A"

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

  (+ (+ x y) x))