Average Error: 0.0 → 0
Time: 10.7s
Precision: 64
\[\left(x + y\right) + x\]
\[2 \cdot x + y\]
\left(x + y\right) + x
2 \cdot x + y
double f(double x, double y) {
        double r355486 = x;
        double r355487 = y;
        double r355488 = r355486 + r355487;
        double r355489 = r355488 + r355486;
        return r355489;
}

double f(double x, double y) {
        double r355490 = 2.0;
        double r355491 = x;
        double r355492 = r355490 * r355491;
        double r355493 = y;
        double r355494 = r355492 + r355493;
        return r355494;
}

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. Using strategy rm
  5. Applied add-sqr-sqrt32.4

    \[\leadsto \color{blue}{\sqrt{\sqrt{\left(x + y\right) + x} \cdot \sqrt{\left(x + y\right) + x}} \cdot \sqrt{\sqrt{\left(x + y\right) + x} \cdot \sqrt{\left(x + y\right) + x}}}\]
  6. Simplified32.4

    \[\leadsto \color{blue}{\sqrt{2 \cdot x + y}} \cdot \sqrt{\sqrt{\left(x + y\right) + x} \cdot \sqrt{\left(x + y\right) + x}}\]
  7. Simplified32.4

    \[\leadsto \sqrt{2 \cdot x + y} \cdot \color{blue}{\sqrt{2 \cdot x + y}}\]
  8. Using strategy rm
  9. Applied pow1/232.4

    \[\leadsto \sqrt{2 \cdot x + y} \cdot \color{blue}{{\left(2 \cdot x + y\right)}^{\frac{1}{2}}}\]
  10. Applied pow1/232.4

    \[\leadsto \color{blue}{{\left(2 \cdot x + y\right)}^{\frac{1}{2}}} \cdot {\left(2 \cdot x + y\right)}^{\frac{1}{2}}\]
  11. Applied pow-prod-up0

    \[\leadsto \color{blue}{{\left(2 \cdot x + y\right)}^{\left(\frac{1}{2} + \frac{1}{2}\right)}}\]
  12. Simplified0

    \[\leadsto {\left(2 \cdot x + y\right)}^{\color{blue}{1}}\]
  13. Final simplification0

    \[\leadsto 2 \cdot x + y\]

Reproduce

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

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

  (+ (+ x y) x))