Average Error: 0.1 → 0.1
Time: 13.0s
Precision: 64
\[x \cdot \left(y + z\right) + z \cdot 5\]
\[\left(x \cdot y + z \cdot x\right) + z \cdot 5\]
x \cdot \left(y + z\right) + z \cdot 5
\left(x \cdot y + z \cdot x\right) + z \cdot 5
double f(double x, double y, double z) {
        double r374126 = x;
        double r374127 = y;
        double r374128 = z;
        double r374129 = r374127 + r374128;
        double r374130 = r374126 * r374129;
        double r374131 = 5.0;
        double r374132 = r374128 * r374131;
        double r374133 = r374130 + r374132;
        return r374133;
}

double f(double x, double y, double z) {
        double r374134 = x;
        double r374135 = y;
        double r374136 = r374134 * r374135;
        double r374137 = z;
        double r374138 = r374137 * r374134;
        double r374139 = r374136 + r374138;
        double r374140 = 5.0;
        double r374141 = r374137 * r374140;
        double r374142 = r374139 + r374141;
        return r374142;
}

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

Target

Original0.1
Target0.1
Herbie0.1
\[\left(x + 5\right) \cdot z + x \cdot y\]

Derivation

  1. Initial program 0.1

    \[x \cdot \left(y + z\right) + z \cdot 5\]
  2. Using strategy rm
  3. Applied distribute-rgt-in0.1

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

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

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

Reproduce

herbie shell --seed 2019199 
(FPCore (x y z)
  :name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, C"

  :herbie-target
  (+ (* (+ x 5.0) z) (* x y))

  (+ (* x (+ y z)) (* z 5.0)))