Average Error: 0.1 → 0.1
Time: 8.1s
Precision: 64
\[x \cdot \left(y + z\right) + z \cdot 5\]
\[\left(y \cdot x + z \cdot x\right) + z \cdot 5\]
x \cdot \left(y + z\right) + z \cdot 5
\left(y \cdot x + z \cdot x\right) + z \cdot 5
double f(double x, double y, double z) {
        double r430259 = x;
        double r430260 = y;
        double r430261 = z;
        double r430262 = r430260 + r430261;
        double r430263 = r430259 * r430262;
        double r430264 = 5.0;
        double r430265 = r430261 * r430264;
        double r430266 = r430263 + r430265;
        return r430266;
}

double f(double x, double y, double z) {
        double r430267 = y;
        double r430268 = x;
        double r430269 = r430267 * r430268;
        double r430270 = z;
        double r430271 = r430270 * r430268;
        double r430272 = r430269 + r430271;
        double r430273 = 5.0;
        double r430274 = r430270 * r430273;
        double r430275 = r430272 + r430274;
        return r430275;
}

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

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

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

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

Reproduce

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