Average Error: 0.1 → 0.1
Time: 1.2m
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 r304215 = x;
        double r304216 = y;
        double r304217 = r304215 + r304216;
        double r304218 = r304217 + r304216;
        double r304219 = r304218 + r304215;
        double r304220 = z;
        double r304221 = r304219 + r304220;
        double r304222 = r304221 + r304215;
        return r304222;
}

double f(double x, double y, double z) {
        double r304223 = 3.0;
        double r304224 = x;
        double r304225 = r304223 * r304224;
        double r304226 = z;
        double r304227 = 2.0;
        double r304228 = y;
        double r304229 = r304227 * r304228;
        double r304230 = r304226 + r304229;
        double r304231 = r304225 + r304230;
        return r304231;
}

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. 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 2019303 
(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))