Average Error: 0.1 → 0.1
Time: 15.9s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[\left(x - \left(\left(y + 0.5\right) \cdot \log y - y\right)\right) - z\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(x - \left(\left(y + 0.5\right) \cdot \log y - y\right)\right) - z
double f(double x, double y, double z) {
        double r276528 = x;
        double r276529 = y;
        double r276530 = 0.5;
        double r276531 = r276529 + r276530;
        double r276532 = log(r276529);
        double r276533 = r276531 * r276532;
        double r276534 = r276528 - r276533;
        double r276535 = r276534 + r276529;
        double r276536 = z;
        double r276537 = r276535 - r276536;
        return r276537;
}

double f(double x, double y, double z) {
        double r276538 = x;
        double r276539 = y;
        double r276540 = 0.5;
        double r276541 = r276539 + r276540;
        double r276542 = log(r276539);
        double r276543 = r276541 * r276542;
        double r276544 = r276543 - r276539;
        double r276545 = r276538 - r276544;
        double r276546 = z;
        double r276547 = r276545 - r276546;
        return r276547;
}

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

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

Reproduce

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