Average Error: 0.0 → 0.0
Time: 4.4s
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 r536399 = x;
        double r536400 = y;
        double r536401 = r536399 + r536400;
        double r536402 = r536401 + r536399;
        return r536402;
}

double f(double x, double y) {
        double r536403 = x;
        double r536404 = y;
        double r536405 = r536404 + r536403;
        double r536406 = r536403 + r536405;
        return r536406;
}

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 2019194 
(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))