Average Error: 0.1 → 0.1
Time: 1.8s
Precision: 64
\[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
\[\left(x \cdot 2 + \left(y \cdot 2 + x\right)\right) + z\]
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
\left(x \cdot 2 + \left(y \cdot 2 + x\right)\right) + z
double f(double x, double y, double z) {
        double r224794 = x;
        double r224795 = y;
        double r224796 = r224794 + r224795;
        double r224797 = r224796 + r224795;
        double r224798 = r224797 + r224794;
        double r224799 = z;
        double r224800 = r224798 + r224799;
        double r224801 = r224800 + r224794;
        return r224801;
}

double f(double x, double y, double z) {
        double r224802 = x;
        double r224803 = 2.0;
        double r224804 = r224802 * r224803;
        double r224805 = y;
        double r224806 = r224805 * r224803;
        double r224807 = r224806 + r224802;
        double r224808 = r224804 + r224807;
        double r224809 = z;
        double r224810 = r224808 + r224809;
        return r224810;
}

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. Using strategy rm
  3. Applied *-un-lft-identity0.1

    \[\leadsto \left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + \color{blue}{1 \cdot x}\]
  4. Applied *-un-lft-identity0.1

    \[\leadsto \color{blue}{1 \cdot \left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right)} + 1 \cdot x\]
  5. Applied distribute-lft-out0.1

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

    \[\leadsto 1 \cdot \color{blue}{\left(\left(2 \cdot \left(x + y\right) + x\right) + z\right)}\]
  7. Using strategy rm
  8. Applied distribute-rgt-in0.1

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

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

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

Reproduce

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