Average Error: 0.1 → 0.1
Time: 8.4s
Precision: 64
\[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
\[2 \cdot x + \left(2 \cdot y + \left(z + x\right)\right)\]
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
2 \cdot x + \left(2 \cdot y + \left(z + x\right)\right)
double f(double x, double y, double z) {
        double r201210 = x;
        double r201211 = y;
        double r201212 = r201210 + r201211;
        double r201213 = r201212 + r201211;
        double r201214 = r201213 + r201210;
        double r201215 = z;
        double r201216 = r201214 + r201215;
        double r201217 = r201216 + r201210;
        return r201217;
}

double f(double x, double y, double z) {
        double r201218 = 2.0;
        double r201219 = x;
        double r201220 = r201218 * r201219;
        double r201221 = y;
        double r201222 = r201218 * r201221;
        double r201223 = z;
        double r201224 = r201223 + r201219;
        double r201225 = r201222 + r201224;
        double r201226 = r201220 + r201225;
        return r201226;
}

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(z + x\right)}\]
  3. Using strategy rm
  4. Applied distribute-lft-in0.1

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

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

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

Reproduce

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