Average Error: 0.1 → 0.1
Time: 1.9m
Precision: 64
\[x \cdot \left(y + z\right) + z \cdot 5.0\]
\[z \cdot 5.0 + \left(y + z\right) \cdot x\]
x \cdot \left(y + z\right) + z \cdot 5.0
z \cdot 5.0 + \left(y + z\right) \cdot x
double f(double x, double y, double z) {
        double r29311860 = x;
        double r29311861 = y;
        double r29311862 = z;
        double r29311863 = r29311861 + r29311862;
        double r29311864 = r29311860 * r29311863;
        double r29311865 = 5.0;
        double r29311866 = r29311862 * r29311865;
        double r29311867 = r29311864 + r29311866;
        return r29311867;
}

double f(double x, double y, double z) {
        double r29311868 = z;
        double r29311869 = 5.0;
        double r29311870 = r29311868 * r29311869;
        double r29311871 = y;
        double r29311872 = r29311871 + r29311868;
        double r29311873 = x;
        double r29311874 = r29311872 * r29311873;
        double r29311875 = r29311870 + r29311874;
        return r29311875;
}

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.0\right) \cdot z + x \cdot y\]

Derivation

  1. Initial program 0.1

    \[x \cdot \left(y + z\right) + z \cdot 5.0\]
  2. Final simplification0.1

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

Reproduce

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