Average Error: 0.1 → 0.1
Time: 12.8s
Precision: 64
\[x \cdot \left(y + z\right) + z \cdot 5\]
\[z \cdot 5 + \left(y + z\right) \cdot x\]
x \cdot \left(y + z\right) + z \cdot 5
z \cdot 5 + \left(y + z\right) \cdot x
double f(double x, double y, double z) {
        double r544181 = x;
        double r544182 = y;
        double r544183 = z;
        double r544184 = r544182 + r544183;
        double r544185 = r544181 * r544184;
        double r544186 = 5.0;
        double r544187 = r544183 * r544186;
        double r544188 = r544185 + r544187;
        return r544188;
}

double f(double x, double y, double z) {
        double r544189 = z;
        double r544190 = 5.0;
        double r544191 = r544189 * r544190;
        double r544192 = y;
        double r544193 = r544192 + r544189;
        double r544194 = x;
        double r544195 = r544193 * r544194;
        double r544196 = r544191 + r544195;
        return r544196;
}

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. Simplified0.1

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

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

Reproduce

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