Average Error: 0.1 → 0.1
Time: 18.4s
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 r324502 = x;
        double r324503 = y;
        double r324504 = 0.5;
        double r324505 = r324503 + r324504;
        double r324506 = log(r324503);
        double r324507 = r324505 * r324506;
        double r324508 = r324502 - r324507;
        double r324509 = r324508 + r324503;
        double r324510 = z;
        double r324511 = r324509 - r324510;
        return r324511;
}

double f(double x, double y, double z) {
        double r324512 = x;
        double r324513 = y;
        double r324514 = 0.5;
        double r324515 = r324513 + r324514;
        double r324516 = log(r324513);
        double r324517 = r324515 * r324516;
        double r324518 = r324512 - r324517;
        double r324519 = r324518 + r324513;
        double r324520 = z;
        double r324521 = r324519 - r324520;
        return r324521;
}

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 2020046 +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))