Average Error: 0.1 → 0.1
Time: 7.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 r164412 = x;
        double r164413 = y;
        double r164414 = r164412 + r164413;
        double r164415 = r164414 + r164413;
        double r164416 = r164415 + r164412;
        double r164417 = z;
        double r164418 = r164416 + r164417;
        double r164419 = r164418 + r164412;
        return r164419;
}

double f(double x, double y, double z) {
        double r164420 = 2.0;
        double r164421 = x;
        double r164422 = y;
        double r164423 = r164421 + r164422;
        double r164424 = r164420 * r164423;
        double r164425 = z;
        double r164426 = r164421 + r164425;
        double r164427 = r164424 + r164426;
        return r164427;
}

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