Average Error: 0.1 → 0.1
Time: 6.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 r157322 = x;
        double r157323 = y;
        double r157324 = r157322 + r157323;
        double r157325 = r157324 + r157323;
        double r157326 = r157325 + r157322;
        double r157327 = z;
        double r157328 = r157326 + r157327;
        double r157329 = r157328 + r157322;
        return r157329;
}

double f(double x, double y, double z) {
        double r157330 = 2.0;
        double r157331 = x;
        double r157332 = y;
        double r157333 = r157331 + r157332;
        double r157334 = r157330 * r157333;
        double r157335 = z;
        double r157336 = r157331 + r157335;
        double r157337 = r157334 + r157336;
        return r157337;
}

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