Average Error: 0.0 → 0
Time: 5.2s
Precision: 64
\[\left(x + y\right) + x\]
\[2 \cdot x + y\]
\left(x + y\right) + x
2 \cdot x + y
double f(double x, double y) {
        double r38526787 = x;
        double r38526788 = y;
        double r38526789 = r38526787 + r38526788;
        double r38526790 = r38526789 + r38526787;
        return r38526790;
}

double f(double x, double y) {
        double r38526791 = 2.0;
        double r38526792 = x;
        double r38526793 = r38526791 * r38526792;
        double r38526794 = y;
        double r38526795 = r38526793 + r38526794;
        return r38526795;
}

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 flip3-+42.7

    \[\leadsto \color{blue}{\frac{{\left(x + y\right)}^{3} + {x}^{3}}{\left(x + y\right) \cdot \left(x + y\right) + \left(x \cdot x - \left(x + y\right) \cdot x\right)}}\]
  4. Simplified42.6

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

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

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

Reproduce

herbie shell --seed 2019174 
(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))