Average Error: 0.1 → 0.1
Time: 4.9s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[\left(x - \left(y + 0.5\right) \cdot \log y\right) + \left(y - z\right)\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(x - \left(y + 0.5\right) \cdot \log y\right) + \left(y - z\right)
double f(double x, double y, double z) {
        double r307357 = x;
        double r307358 = y;
        double r307359 = 0.5;
        double r307360 = r307358 + r307359;
        double r307361 = log(r307358);
        double r307362 = r307360 * r307361;
        double r307363 = r307357 - r307362;
        double r307364 = r307363 + r307358;
        double r307365 = z;
        double r307366 = r307364 - r307365;
        return r307366;
}

double f(double x, double y, double z) {
        double r307367 = x;
        double r307368 = y;
        double r307369 = 0.5;
        double r307370 = r307368 + r307369;
        double r307371 = log(r307368);
        double r307372 = r307370 * r307371;
        double r307373 = r307367 - r307372;
        double r307374 = z;
        double r307375 = r307368 - r307374;
        double r307376 = r307373 + r307375;
        return r307376;
}

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(y + 0.5\right) \cdot \log y\right) + \left(y - z\right)}\]
  4. Final simplification0.1

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

Reproduce

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