Average Error: 0.1 → 0.1
Time: 18.7s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
double f(double x, double y, double z) {
        double r302315 = x;
        double r302316 = y;
        double r302317 = 0.5;
        double r302318 = r302316 + r302317;
        double r302319 = log(r302316);
        double r302320 = r302318 * r302319;
        double r302321 = r302315 - r302320;
        double r302322 = r302321 + r302316;
        double r302323 = z;
        double r302324 = r302322 - r302323;
        return r302324;
}

double f(double x, double y, double z) {
        double r302325 = x;
        double r302326 = y;
        double r302327 = 0.5;
        double r302328 = r302326 + r302327;
        double r302329 = log(r302326);
        double r302330 = r302328 * r302329;
        double r302331 = r302325 - r302330;
        double r302332 = r302331 + r302326;
        double r302333 = z;
        double r302334 = r302332 - r302333;
        return r302334;
}

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. Final simplification0.1

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

Reproduce

herbie shell --seed 2020047 +o rules:numerics
(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))