Average Error: 0.1 → 0.1
Time: 23.5s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[\left(x + \left(y - \left(y + 0.5\right) \cdot \log y\right)\right) - z\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(x + \left(y - \left(y + 0.5\right) \cdot \log y\right)\right) - z
double f(double x, double y, double z) {
        double r16610898 = x;
        double r16610899 = y;
        double r16610900 = 0.5;
        double r16610901 = r16610899 + r16610900;
        double r16610902 = log(r16610899);
        double r16610903 = r16610901 * r16610902;
        double r16610904 = r16610898 - r16610903;
        double r16610905 = r16610904 + r16610899;
        double r16610906 = z;
        double r16610907 = r16610905 - r16610906;
        return r16610907;
}

double f(double x, double y, double z) {
        double r16610908 = x;
        double r16610909 = y;
        double r16610910 = 0.5;
        double r16610911 = r16610909 + r16610910;
        double r16610912 = log(r16610909);
        double r16610913 = r16610911 * r16610912;
        double r16610914 = r16610909 - r16610913;
        double r16610915 = r16610908 + r16610914;
        double r16610916 = z;
        double r16610917 = r16610915 - r16610916;
        return r16610917;
}

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(\left(y + x\right) - z\right) - \left(y + 0.5\right) \cdot \log y\]

Derivation

  1. Initial program 0.1

    \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
  2. Using strategy rm
  3. Applied sub-neg0.1

    \[\leadsto \left(\color{blue}{\left(x + \left(-\left(y + 0.5\right) \cdot \log y\right)\right)} + y\right) - z\]
  4. Applied associate-+l+0.1

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

    \[\leadsto \left(x + \color{blue}{\left(y - \log y \cdot \left(y + 0.5\right)\right)}\right) - z\]
  6. Final simplification0.1

    \[\leadsto \left(x + \left(y - \left(y + 0.5\right) \cdot \log y\right)\right) - z\]

Reproduce

herbie shell --seed 2019170 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:stirlingError from math-functions-0.1.5.2"

  :herbie-target
  (- (- (+ y x) z) (* (+ y 0.5) (log y)))

  (- (+ (- x (* (+ y 0.5) (log y))) y) z))