Average Error: 0.1 → 0.1
Time: 8.8s
Precision: 64
\[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
\[\left(x + z\right) + 2 \cdot \left(x + y\right)\]
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
\left(x + z\right) + 2 \cdot \left(x + y\right)
double f(double x, double y, double z) {
        double r133862 = x;
        double r133863 = y;
        double r133864 = r133862 + r133863;
        double r133865 = r133864 + r133863;
        double r133866 = r133865 + r133862;
        double r133867 = z;
        double r133868 = r133866 + r133867;
        double r133869 = r133868 + r133862;
        return r133869;
}

double f(double x, double y, double z) {
        double r133870 = x;
        double r133871 = z;
        double r133872 = r133870 + r133871;
        double r133873 = 2.0;
        double r133874 = y;
        double r133875 = r133870 + r133874;
        double r133876 = r133873 * r133875;
        double r133877 = r133872 + r133876;
        return r133877;
}

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}{x + \left(z + 2 \cdot \left(x + y\right)\right)}\]
  3. Using strategy rm
  4. Applied associate-+r+0.1

    \[\leadsto \color{blue}{\left(x + z\right) + 2 \cdot \left(x + y\right)}\]
  5. Final simplification0.1

    \[\leadsto \left(x + z\right) + 2 \cdot \left(x + y\right)\]

Reproduce

herbie shell --seed 2019323 
(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))