Average Error: 0.1 → 0.1
Time: 8.2s
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 r234304 = x;
        double r234305 = y;
        double r234306 = r234304 + r234305;
        double r234307 = r234306 + r234305;
        double r234308 = r234307 + r234304;
        double r234309 = z;
        double r234310 = r234308 + r234309;
        double r234311 = r234310 + r234304;
        return r234311;
}

double f(double x, double y, double z) {
        double r234312 = 2.0;
        double r234313 = x;
        double r234314 = y;
        double r234315 = r234313 + r234314;
        double r234316 = r234312 * r234315;
        double r234317 = z;
        double r234318 = r234313 + r234317;
        double r234319 = r234316 + r234318;
        return r234319;
}

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 2020027 
(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))