Average Error: 0.1 → 0.1
Time: 7.1s
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 r193800 = x;
        double r193801 = y;
        double r193802 = r193800 + r193801;
        double r193803 = r193802 + r193801;
        double r193804 = r193803 + r193800;
        double r193805 = z;
        double r193806 = r193804 + r193805;
        double r193807 = r193806 + r193800;
        return r193807;
}

double f(double x, double y, double z) {
        double r193808 = 2.0;
        double r193809 = x;
        double r193810 = y;
        double r193811 = r193809 + r193810;
        double r193812 = r193808 * r193811;
        double r193813 = z;
        double r193814 = r193809 + r193813;
        double r193815 = r193812 + r193814;
        return r193815;
}

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