Average Error: 0.1 → 0.1
Time: 11.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 r462739 = x;
        double r462740 = y;
        double r462741 = z;
        double r462742 = r462740 + r462741;
        double r462743 = r462739 * r462742;
        double r462744 = 5.0;
        double r462745 = r462741 * r462744;
        double r462746 = r462743 + r462745;
        return r462746;
}

double f(double x, double y, double z) {
        double r462747 = z;
        double r462748 = 5.0;
        double r462749 = r462747 * r462748;
        double r462750 = y;
        double r462751 = r462750 + r462747;
        double r462752 = x;
        double r462753 = r462751 * r462752;
        double r462754 = r462749 + r462753;
        return r462754;
}

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