Average Error: 0.0 → 0
Time: 10.2s
Precision: 64
\[\left(x + y\right) + x\]
\[y + \left(x + x\right)\]
\left(x + y\right) + x
y + \left(x + x\right)
double f(double x, double y) {
        double r490300 = x;
        double r490301 = y;
        double r490302 = r490300 + r490301;
        double r490303 = r490302 + r490300;
        return r490303;
}

double f(double x, double y) {
        double r490304 = y;
        double r490305 = x;
        double r490306 = r490305 + r490305;
        double r490307 = r490304 + r490306;
        return r490307;
}

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

    \[\leadsto \color{blue}{\sqrt{\left(x + y\right) + x} \cdot \sqrt{\left(x + y\right) + x}}\]
  4. Using strategy rm
  5. Applied *-un-lft-identity32.5

    \[\leadsto \sqrt{\left(x + y\right) + x} \cdot \sqrt{\color{blue}{1 \cdot \left(\left(x + y\right) + x\right)}}\]
  6. Applied sqrt-prod32.5

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

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

    \[\leadsto \sqrt{\left(x + y\right) + x} \cdot \left(1 \cdot \color{blue}{\sqrt{2 \cdot x + y}}\right)\]
  9. Using strategy rm
  10. Applied *-un-lft-identity32.5

    \[\leadsto \color{blue}{\left(1 \cdot \sqrt{\left(x + y\right) + x}\right)} \cdot \left(1 \cdot \sqrt{2 \cdot x + y}\right)\]
  11. Applied associate-*l*32.5

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

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

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

Reproduce

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