Average Error: 0.0 → 0
Time: 12.6s
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 r28995105 = x;
        double r28995106 = y;
        double r28995107 = r28995105 + r28995106;
        double r28995108 = r28995107 + r28995105;
        return r28995108;
}

double f(double x, double y) {
        double r28995109 = x;
        double r28995110 = r28995109 + r28995109;
        double r28995111 = y;
        double r28995112 = r28995110 + r28995111;
        return r28995112;
}

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 flip-+47.1

    \[\leadsto \color{blue}{\frac{\left(x + y\right) \cdot \left(x + y\right) - x \cdot x}{\left(x + y\right) - x}}\]
  4. Simplified47.2

    \[\leadsto \frac{\color{blue}{\left(x + \left(x + y\right)\right) \cdot y}}{\left(x + y\right) - x}\]
  5. Simplified23.6

    \[\leadsto \frac{\left(x + \left(x + y\right)\right) \cdot y}{\color{blue}{y}}\]
  6. Using strategy rm
  7. Applied add-cube-cbrt24.5

    \[\leadsto \frac{\left(x + \left(x + y\right)\right) \cdot y}{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}\]
  8. Applied times-frac6.7

    \[\leadsto \color{blue}{\frac{x + \left(x + y\right)}{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \frac{y}{\sqrt[3]{y}}}\]
  9. Using strategy rm
  10. Applied add-cube-cbrt7.0

    \[\leadsto \frac{x + \left(x + y\right)}{\sqrt[3]{y} \cdot \color{blue}{\left(\left(\sqrt[3]{\sqrt[3]{y}} \cdot \sqrt[3]{\sqrt[3]{y}}\right) \cdot \sqrt[3]{\sqrt[3]{y}}\right)}} \cdot \frac{y}{\sqrt[3]{y}}\]
  11. Taylor expanded around 0 0

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

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

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

Reproduce

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

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

  (+ (+ x y) x))