Average Error: 0.1 → 0.1
Time: 5.3s
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 r149420 = x;
        double r149421 = y;
        double r149422 = r149420 + r149421;
        double r149423 = r149422 + r149421;
        double r149424 = r149423 + r149420;
        double r149425 = z;
        double r149426 = r149424 + r149425;
        double r149427 = r149426 + r149420;
        return r149427;
}

double f(double x, double y, double z) {
        double r149428 = 2.0;
        double r149429 = x;
        double r149430 = y;
        double r149431 = r149429 + r149430;
        double r149432 = r149428 * r149431;
        double r149433 = z;
        double r149434 = r149429 + r149433;
        double r149435 = r149432 + r149434;
        return r149435;
}

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