Average Error: 0.0 → 0
Time: 16.2s
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 r30952128 = x;
        double r30952129 = y;
        double r30952130 = r30952128 + r30952129;
        double r30952131 = r30952130 + r30952128;
        return r30952131;
}

double f(double x, double y) {
        double r30952132 = y;
        double r30952133 = 2.0;
        double r30952134 = x;
        double r30952135 = r30952133 * r30952134;
        double r30952136 = r30952132 + r30952135;
        return r30952136;
}

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.8

    \[\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 2019171 
(FPCore (x y)
  :name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, A"

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

  (+ (+ x y) x))