Average Error: 0.1 → 0.1
Time: 10.0s
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 r220426 = x;
        double r220427 = y;
        double r220428 = r220426 + r220427;
        double r220429 = r220428 + r220427;
        double r220430 = r220429 + r220426;
        double r220431 = z;
        double r220432 = r220430 + r220431;
        double r220433 = r220432 + r220426;
        return r220433;
}

double f(double x, double y, double z) {
        double r220434 = 2.0;
        double r220435 = x;
        double r220436 = y;
        double r220437 = r220435 + r220436;
        double r220438 = r220434 * r220437;
        double r220439 = z;
        double r220440 = r220435 + r220439;
        double r220441 = r220438 + r220440;
        return r220441;
}

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