Average Error: 0.1 → 0.1
Time: 16.8s
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 r124418 = x;
        double r124419 = y;
        double r124420 = r124418 + r124419;
        double r124421 = r124420 + r124419;
        double r124422 = r124421 + r124418;
        double r124423 = z;
        double r124424 = r124422 + r124423;
        double r124425 = r124424 + r124418;
        return r124425;
}

double f(double x, double y, double z) {
        double r124426 = 3.0;
        double r124427 = x;
        double r124428 = r124426 * r124427;
        double r124429 = z;
        double r124430 = 2.0;
        double r124431 = y;
        double r124432 = r124430 * r124431;
        double r124433 = r124429 + r124432;
        double r124434 = r124428 + r124433;
        return r124434;
}

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

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

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

Reproduce

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