Average Error: 0.1 → 0.1
Time: 7.5s
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 r317399 = x;
        double r317400 = y;
        double r317401 = 0.5;
        double r317402 = r317400 + r317401;
        double r317403 = log(r317400);
        double r317404 = r317402 * r317403;
        double r317405 = r317399 - r317404;
        double r317406 = r317405 + r317400;
        double r317407 = z;
        double r317408 = r317406 - r317407;
        return r317408;
}

double f(double x, double y, double z) {
        double r317409 = x;
        double r317410 = y;
        double r317411 = 0.5;
        double r317412 = r317410 + r317411;
        double r317413 = log(r317410);
        double r317414 = r317412 * r317413;
        double r317415 = r317414 - r317410;
        double r317416 = z;
        double r317417 = r317415 + r317416;
        double r317418 = r317409 - r317417;
        return r317418;
}

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 2019322 
(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))