Average Error: 0.1 → 0.1
Time: 12.1s
Precision: 64
\[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
\[x + \left(\left(z + 2 \cdot x\right) + y \cdot 2\right)\]
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
x + \left(\left(z + 2 \cdot x\right) + y \cdot 2\right)
double f(double x, double y, double z) {
        double r126623 = x;
        double r126624 = y;
        double r126625 = r126623 + r126624;
        double r126626 = r126625 + r126624;
        double r126627 = r126626 + r126623;
        double r126628 = z;
        double r126629 = r126627 + r126628;
        double r126630 = r126629 + r126623;
        return r126630;
}

double f(double x, double y, double z) {
        double r126631 = x;
        double r126632 = z;
        double r126633 = 2.0;
        double r126634 = r126633 * r126631;
        double r126635 = r126632 + r126634;
        double r126636 = y;
        double r126637 = r126636 * r126633;
        double r126638 = r126635 + r126637;
        double r126639 = r126631 + r126638;
        return r126639;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
  2. Simplified0.1

    \[\leadsto \color{blue}{x + \left(z + 2 \cdot \left(x + y\right)\right)}\]
  3. Using strategy rm
  4. Applied distribute-rgt-in0.1

    \[\leadsto x + \left(z + \color{blue}{\left(x \cdot 2 + y \cdot 2\right)}\right)\]
  5. Applied associate-+r+0.1

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

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

    \[\leadsto x + \left(\left(z + 2 \cdot x\right) + y \cdot 2\right)\]

Reproduce

herbie shell --seed 2019325 
(FPCore (x y z)
  :name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendInside from plot-0.2.3.4"
  :precision binary64
  (+ (+ (+ (+ (+ x y) y) x) z) x))