Average Error: 0.1 → 0.1
Time: 22.9s
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 r135184 = x;
        double r135185 = y;
        double r135186 = r135184 + r135185;
        double r135187 = r135186 + r135185;
        double r135188 = r135187 + r135184;
        double r135189 = z;
        double r135190 = r135188 + r135189;
        double r135191 = r135190 + r135184;
        return r135191;
}

double f(double x, double y, double z) {
        double r135192 = 2.0;
        double r135193 = x;
        double r135194 = y;
        double r135195 = r135193 + r135194;
        double r135196 = r135192 * r135195;
        double r135197 = z;
        double r135198 = r135193 + r135197;
        double r135199 = r135196 + r135198;
        return r135199;
}

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