Average Error: 0.1 → 0.1
Time: 18.4s
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 r241898 = x;
        double r241899 = y;
        double r241900 = r241898 + r241899;
        double r241901 = r241900 + r241899;
        double r241902 = r241901 + r241898;
        double r241903 = z;
        double r241904 = r241902 + r241903;
        double r241905 = r241904 + r241898;
        return r241905;
}

double f(double x, double y, double z) {
        double r241906 = 2.0;
        double r241907 = x;
        double r241908 = y;
        double r241909 = r241907 + r241908;
        double r241910 = r241906 * r241909;
        double r241911 = z;
        double r241912 = r241907 + r241911;
        double r241913 = r241910 + r241912;
        return r241913;
}

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