Average Error: 0.1 → 0.1
Time: 14.8s
Precision: 64
\[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
\[x + \left(\left(z + 2 \cdot x\right) + y \cdot 2\right)\]
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
x + \left(\left(z + 2 \cdot x\right) + y \cdot 2\right)
double f(double x, double y, double z) {
        double r763248 = x;
        double r763249 = y;
        double r763250 = r763248 + r763249;
        double r763251 = r763250 + r763249;
        double r763252 = r763251 + r763248;
        double r763253 = z;
        double r763254 = r763252 + r763253;
        double r763255 = r763254 + r763248;
        return r763255;
}

double f(double x, double y, double z) {
        double r763256 = x;
        double r763257 = z;
        double r763258 = 2.0;
        double r763259 = r763258 * r763256;
        double r763260 = r763257 + r763259;
        double r763261 = y;
        double r763262 = r763261 * r763258;
        double r763263 = r763260 + r763262;
        double r763264 = r763256 + r763263;
        return r763264;
}

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

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

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

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

    \[\leadsto x + \left(\left(z + 2 \cdot x\right) + y \cdot 2\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))