Average Error: 0.1 → 0.1
Time: 42.1s
Precision: 64
\[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
\[x \cdot 2 + \left(2 \cdot y + \left(z + x\right)\right)\]
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
x \cdot 2 + \left(2 \cdot y + \left(z + x\right)\right)
double f(double x, double y, double z) {
        double r179281 = x;
        double r179282 = y;
        double r179283 = r179281 + r179282;
        double r179284 = r179283 + r179282;
        double r179285 = r179284 + r179281;
        double r179286 = z;
        double r179287 = r179285 + r179286;
        double r179288 = r179287 + r179281;
        return r179288;
}

double f(double x, double y, double z) {
        double r179289 = x;
        double r179290 = 2.0;
        double r179291 = r179289 * r179290;
        double r179292 = y;
        double r179293 = r179290 * r179292;
        double r179294 = z;
        double r179295 = r179294 + r179289;
        double r179296 = r179293 + r179295;
        double r179297 = r179291 + r179296;
        return r179297;
}

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-rgt-in0.1

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

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

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

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

Reproduce

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