Average Error: 0.1 → 0.1
Time: 13.5s
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 r202897 = x;
        double r202898 = y;
        double r202899 = r202897 + r202898;
        double r202900 = r202899 + r202898;
        double r202901 = r202900 + r202897;
        double r202902 = z;
        double r202903 = r202901 + r202902;
        double r202904 = r202903 + r202897;
        return r202904;
}

double f(double x, double y, double z) {
        double r202905 = x;
        double r202906 = 2.0;
        double r202907 = r202905 * r202906;
        double r202908 = y;
        double r202909 = r202906 * r202908;
        double r202910 = z;
        double r202911 = r202910 + r202905;
        double r202912 = r202909 + r202911;
        double r202913 = r202907 + r202912;
        return r202913;
}

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 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))