Average Error: 0.1 → 0.1
Time: 8.5s
Precision: 64
\[x \cdot \left(y + z\right) + z \cdot 5\]
\[z \cdot \left(x + 5\right) + y \cdot x\]
x \cdot \left(y + z\right) + z \cdot 5
z \cdot \left(x + 5\right) + y \cdot x
double f(double x, double y, double z) {
        double r651968 = x;
        double r651969 = y;
        double r651970 = z;
        double r651971 = r651969 + r651970;
        double r651972 = r651968 * r651971;
        double r651973 = 5.0;
        double r651974 = r651970 * r651973;
        double r651975 = r651972 + r651974;
        return r651975;
}

double f(double x, double y, double z) {
        double r651976 = z;
        double r651977 = x;
        double r651978 = 5.0;
        double r651979 = r651977 + r651978;
        double r651980 = r651976 * r651979;
        double r651981 = y;
        double r651982 = r651981 * r651977;
        double r651983 = r651980 + r651982;
        return r651983;
}

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. Taylor expanded around 0 0.1

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

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

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

Reproduce

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

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

  (+ (* x (+ y z)) (* z 5)))