Average Error: 0.0 → 0
Time: 4.2s
Precision: 64
\[\left(x + y\right) + x\]
\[\left(x + x\right) + y\]
\left(x + y\right) + x
\left(x + x\right) + y
double f(double x, double y) {
        double r28956205 = x;
        double r28956206 = y;
        double r28956207 = r28956205 + r28956206;
        double r28956208 = r28956207 + r28956205;
        return r28956208;
}

double f(double x, double y) {
        double r28956209 = x;
        double r28956210 = r28956209 + r28956209;
        double r28956211 = y;
        double r28956212 = r28956210 + r28956211;
        return r28956212;
}

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. Taylor expanded around 0 0

    \[\leadsto \color{blue}{2 \cdot x + y}\]
  3. Simplified0

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

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

Reproduce

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