Average Error: 0.1 → 0.1
Time: 11.1s
Precision: 64
\[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
\[3 \cdot x + \left(z + 2 \cdot y\right)\]
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
3 \cdot x + \left(z + 2 \cdot y\right)
double f(double x, double y, double z) {
        double r152397 = x;
        double r152398 = y;
        double r152399 = r152397 + r152398;
        double r152400 = r152399 + r152398;
        double r152401 = r152400 + r152397;
        double r152402 = z;
        double r152403 = r152401 + r152402;
        double r152404 = r152403 + r152397;
        return r152404;
}

double f(double x, double y, double z) {
        double r152405 = 3.0;
        double r152406 = x;
        double r152407 = r152405 * r152406;
        double r152408 = z;
        double r152409 = 2.0;
        double r152410 = y;
        double r152411 = r152409 * r152410;
        double r152412 = r152408 + r152411;
        double r152413 = r152407 + r152412;
        return r152413;
}

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. Taylor expanded around 0 0.1

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

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

Reproduce

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