Average Error: 0.1 → 0.1
Time: 4.4s
Precision: 64
\[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
\[2 \cdot x + \left(y \cdot 2 + \left(x + z\right)\right)\]
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
2 \cdot x + \left(y \cdot 2 + \left(x + z\right)\right)
double f(double x, double y, double z) {
        double r150306 = x;
        double r150307 = y;
        double r150308 = r150306 + r150307;
        double r150309 = r150308 + r150307;
        double r150310 = r150309 + r150306;
        double r150311 = z;
        double r150312 = r150310 + r150311;
        double r150313 = r150312 + r150306;
        return r150313;
}

double f(double x, double y, double z) {
        double r150314 = 2.0;
        double r150315 = x;
        double r150316 = r150314 * r150315;
        double r150317 = y;
        double r150318 = r150317 * r150314;
        double r150319 = z;
        double r150320 = r150315 + r150319;
        double r150321 = r150318 + r150320;
        double r150322 = r150316 + r150321;
        return r150322;
}

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. Using strategy rm
  4. Applied distribute-lft-in0.1

    \[\leadsto \color{blue}{\left(2 \cdot x + 2 \cdot y\right)} + \left(x + z\right)\]
  5. Applied associate-+l+0.1

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

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

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

Reproduce

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