Average Error: 0.0 → 0
Time: 4.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 r594243 = x;
        double r594244 = y;
        double r594245 = r594243 + r594244;
        double r594246 = r594245 + r594243;
        return r594246;
}

double f(double x, double y) {
        double r594247 = 2.0;
        double r594248 = x;
        double r594249 = r594247 * r594248;
        double r594250 = y;
        double r594251 = r594249 + r594250;
        return r594251;
}

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-cube-cbrt1.3

    \[\leadsto \color{blue}{\left(\sqrt[3]{\left(x + y\right) + x} \cdot \sqrt[3]{\left(x + y\right) + x}\right) \cdot \sqrt[3]{\left(x + y\right) + x}}\]
  4. Using strategy rm
  5. Applied pow11.3

    \[\leadsto \left(\sqrt[3]{\left(x + y\right) + x} \cdot \color{blue}{{\left(\sqrt[3]{\left(x + y\right) + x}\right)}^{1}}\right) \cdot \sqrt[3]{\left(x + y\right) + x}\]
  6. Applied pow11.3

    \[\leadsto \left(\color{blue}{{\left(\sqrt[3]{\left(x + y\right) + x}\right)}^{1}} \cdot {\left(\sqrt[3]{\left(x + y\right) + x}\right)}^{1}\right) \cdot \sqrt[3]{\left(x + y\right) + x}\]
  7. Applied pow-prod-down1.3

    \[\leadsto \color{blue}{{\left(\sqrt[3]{\left(x + y\right) + x} \cdot \sqrt[3]{\left(x + y\right) + x}\right)}^{1}} \cdot \sqrt[3]{\left(x + y\right) + x}\]
  8. Simplified32.5

    \[\leadsto {\color{blue}{\left({\left(\sqrt{\sqrt[3]{\left(x + y\right) + x}}\right)}^{4}\right)}}^{1} \cdot \sqrt[3]{\left(x + y\right) + x}\]
  9. Taylor expanded around 0 0

    \[\leadsto \color{blue}{2 \cdot x + y}\]
  10. Final simplification0

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

Reproduce

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