Average Error: 0.1 → 0.1
Time: 56.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 r276564 = x;
        double r276565 = y;
        double r276566 = 0.5;
        double r276567 = r276565 + r276566;
        double r276568 = log(r276565);
        double r276569 = r276567 * r276568;
        double r276570 = r276564 - r276569;
        double r276571 = r276570 + r276565;
        double r276572 = z;
        double r276573 = r276571 - r276572;
        return r276573;
}

double f(double x, double y, double z) {
        double r276574 = x;
        double r276575 = y;
        double r276576 = 0.5;
        double r276577 = r276575 + r276576;
        double r276578 = log(r276575);
        double r276579 = r276577 * r276578;
        double r276580 = r276574 - r276579;
        double r276581 = r276580 + r276575;
        double r276582 = z;
        double r276583 = r276581 - r276582;
        return r276583;
}

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