Average Error: 0.1 → 0.1
Time: 8.3s
Precision: 64
\[x \cdot \left(y + z\right) + z \cdot 5\]
\[z \cdot \left(x + 5\right) + x \cdot y\]
x \cdot \left(y + z\right) + z \cdot 5
z \cdot \left(x + 5\right) + x \cdot y
double f(double x, double y, double z) {
        double r587922 = x;
        double r587923 = y;
        double r587924 = z;
        double r587925 = r587923 + r587924;
        double r587926 = r587922 * r587925;
        double r587927 = 5.0;
        double r587928 = r587924 * r587927;
        double r587929 = r587926 + r587928;
        return r587929;
}

double f(double x, double y, double z) {
        double r587930 = z;
        double r587931 = x;
        double r587932 = 5.0;
        double r587933 = r587931 + r587932;
        double r587934 = r587930 * r587933;
        double r587935 = y;
        double r587936 = r587931 * r587935;
        double r587937 = r587934 + r587936;
        return r587937;
}

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) + x \cdot y}\]
  4. Final simplification0.1

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

Reproduce

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