Average Error: 0.0 → 0
Time: 4.8s
Precision: 64
\[\left(x + y\right) + x\]
\[y + \left(x + x\right)\]
\left(x + y\right) + x
y + \left(x + x\right)
double f(double x, double y) {
        double r28636012 = x;
        double r28636013 = y;
        double r28636014 = r28636012 + r28636013;
        double r28636015 = r28636014 + r28636012;
        return r28636015;
}

double f(double x, double y) {
        double r28636016 = y;
        double r28636017 = x;
        double r28636018 = r28636017 + r28636017;
        double r28636019 = r28636016 + r28636018;
        return r28636019;
}

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 +-commutative0.0

    \[\leadsto \color{blue}{\left(y + x\right)} + x\]
  4. Applied associate-+l+0

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

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

Reproduce

herbie shell --seed 2019158 
(FPCore (x y)
  :name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, A"

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

  (+ (+ x y) x))