Average Error: 0.0 → 0
Time: 7.3s
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 r23948040 = x;
        double r23948041 = y;
        double r23948042 = r23948040 + r23948041;
        double r23948043 = r23948042 + r23948040;
        return r23948043;
}

double f(double x, double y) {
        double r23948044 = y;
        double r23948045 = 2.0;
        double r23948046 = x;
        double r23948047 = r23948045 * r23948046;
        double r23948048 = r23948044 + r23948047;
        return r23948048;
}

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

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