Average Error: 0.1 → 0.1
Time: 14.8s
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 r217914 = x;
        double r217915 = y;
        double r217916 = r217914 + r217915;
        double r217917 = r217916 + r217915;
        double r217918 = r217917 + r217914;
        double r217919 = z;
        double r217920 = r217918 + r217919;
        double r217921 = r217920 + r217914;
        return r217921;
}

double f(double x, double y, double z) {
        double r217922 = 2.0;
        double r217923 = x;
        double r217924 = y;
        double r217925 = r217923 + r217924;
        double r217926 = r217922 * r217925;
        double r217927 = z;
        double r217928 = r217923 + r217927;
        double r217929 = r217926 + r217928;
        return r217929;
}

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