Average Error: 0.1 → 0.1
Time: 4.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 r205271 = x;
        double r205272 = y;
        double r205273 = r205271 + r205272;
        double r205274 = r205273 + r205272;
        double r205275 = r205274 + r205271;
        double r205276 = z;
        double r205277 = r205275 + r205276;
        double r205278 = r205277 + r205271;
        return r205278;
}

double f(double x, double y, double z) {
        double r205279 = 2.0;
        double r205280 = x;
        double r205281 = y;
        double r205282 = r205280 + r205281;
        double r205283 = r205279 * r205282;
        double r205284 = z;
        double r205285 = r205280 + r205284;
        double r205286 = r205283 + r205285;
        return r205286;
}

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