Average Error: 0.0 → 0
Time: 5.9s
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 r28266417 = x;
        double r28266418 = y;
        double r28266419 = r28266417 + r28266418;
        double r28266420 = r28266419 + r28266417;
        return r28266420;
}

double f(double x, double y) {
        double r28266421 = y;
        double r28266422 = 2.0;
        double r28266423 = x;
        double r28266424 = r28266422 * r28266423;
        double r28266425 = r28266421 + r28266424;
        return r28266425;
}

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-sqrt32.1

    \[\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 2019158 
(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))