Average Error: 0.0 → 0
Time: 10.4s
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 r458493 = x;
        double r458494 = y;
        double r458495 = r458493 + r458494;
        double r458496 = r458495 + r458493;
        return r458496;
}

double f(double x, double y) {
        double r458497 = 2.0;
        double r458498 = x;
        double r458499 = r458497 * r458498;
        double r458500 = y;
        double r458501 = r458499 + r458500;
        return r458501;
}

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.7

    \[\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.7

    \[\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.7

    \[\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.7

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

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

    \[\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 2019303 
(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))