Average Error: 0.1 → 0.1
Time: 20.9s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[x - \left(\left(\left(y + 0.5\right) \cdot \log y - y\right) + z\right)\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
x - \left(\left(\left(y + 0.5\right) \cdot \log y - y\right) + z\right)
double f(double x, double y, double z) {
        double r391056 = x;
        double r391057 = y;
        double r391058 = 0.5;
        double r391059 = r391057 + r391058;
        double r391060 = log(r391057);
        double r391061 = r391059 * r391060;
        double r391062 = r391056 - r391061;
        double r391063 = r391062 + r391057;
        double r391064 = z;
        double r391065 = r391063 - r391064;
        return r391065;
}

double f(double x, double y, double z) {
        double r391066 = x;
        double r391067 = y;
        double r391068 = 0.5;
        double r391069 = r391067 + r391068;
        double r391070 = log(r391067);
        double r391071 = r391069 * r391070;
        double r391072 = r391071 - r391067;
        double r391073 = z;
        double r391074 = r391072 + r391073;
        double r391075 = r391066 - r391074;
        return r391075;
}

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 associate-+l-0.1

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

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

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

Reproduce

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

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

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