Average Error: 0.0 → 0
Time: 10.6s
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 r479563 = x;
        double r479564 = y;
        double r479565 = r479563 + r479564;
        double r479566 = r479565 + r479563;
        return r479566;
}

double f(double x, double y) {
        double r479567 = 2.0;
        double r479568 = x;
        double r479569 = r479567 * r479568;
        double r479570 = y;
        double r479571 = r479569 + r479570;
        return r479571;
}

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