Average Error: 0.1 → 0.1
Time: 5.6s
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 r233526 = x;
        double r233527 = y;
        double r233528 = r233526 + r233527;
        double r233529 = r233528 + r233527;
        double r233530 = r233529 + r233526;
        double r233531 = z;
        double r233532 = r233530 + r233531;
        double r233533 = r233532 + r233526;
        return r233533;
}

double f(double x, double y, double z) {
        double r233534 = 2.0;
        double r233535 = x;
        double r233536 = y;
        double r233537 = r233535 + r233536;
        double r233538 = r233534 * r233537;
        double r233539 = z;
        double r233540 = r233535 + r233539;
        double r233541 = r233538 + r233540;
        return r233541;
}

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