Average Error: 0.1 → 0.1
Time: 13.3s
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 r139761 = x;
        double r139762 = y;
        double r139763 = r139761 + r139762;
        double r139764 = r139763 + r139762;
        double r139765 = r139764 + r139761;
        double r139766 = z;
        double r139767 = r139765 + r139766;
        double r139768 = r139767 + r139761;
        return r139768;
}

double f(double x, double y, double z) {
        double r139769 = 2.0;
        double r139770 = x;
        double r139771 = y;
        double r139772 = r139770 + r139771;
        double r139773 = r139769 * r139772;
        double r139774 = z;
        double r139775 = r139770 + r139774;
        double r139776 = r139773 + r139775;
        return r139776;
}

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. Final simplification0.1

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

Reproduce

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