Average Error: 0.0 → 0.0
Time: 1.6s
Precision: 64
\[\left(x + y\right) + x\]
\[x + \left(y + x\right)\]
\left(x + y\right) + x
x + \left(y + x\right)
double f(double x, double y) {
        double r460692 = x;
        double r460693 = y;
        double r460694 = r460692 + r460693;
        double r460695 = r460694 + r460692;
        return r460695;
}

double f(double x, double y) {
        double r460696 = x;
        double r460697 = y;
        double r460698 = r460697 + r460696;
        double r460699 = r460696 + r460698;
        return r460699;
}

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

Derivation

  1. Initial program 0.0

    \[\left(x + y\right) + x\]
  2. Simplified0.0

    \[\leadsto \color{blue}{x + \left(y + x\right)}\]
  3. Final simplification0.0

    \[\leadsto x + \left(y + x\right)\]

Reproduce

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