Average Error: 0.1 → 0.1
Time: 9.7s
Precision: 64
\[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
\[2 \cdot \left(x + y\right) + \left(x + z\right)\]
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
2 \cdot \left(x + y\right) + \left(x + z\right)
double f(double x, double y, double z) {
        double r633 = x;
        double r634 = y;
        double r635 = r633 + r634;
        double r636 = r635 + r634;
        double r637 = r636 + r633;
        double r638 = z;
        double r639 = r637 + r638;
        double r640 = r639 + r633;
        return r640;
}

double f(double x, double y, double z) {
        double r641 = 2.0;
        double r642 = x;
        double r643 = y;
        double r644 = r642 + r643;
        double r645 = r641 * r644;
        double r646 = z;
        double r647 = r642 + r646;
        double r648 = r645 + r647;
        return r648;
}

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}{2 \cdot \left(x + y\right) + \left(x + z\right)}\]
  3. Final simplification0.1

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

Reproduce

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