Average Error: 0.1 → 0.1
Time: 16.2s
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 r16720560 = x;
        double r16720561 = y;
        double r16720562 = 0.5;
        double r16720563 = r16720561 + r16720562;
        double r16720564 = log(r16720561);
        double r16720565 = r16720563 * r16720564;
        double r16720566 = r16720560 - r16720565;
        double r16720567 = r16720566 + r16720561;
        double r16720568 = z;
        double r16720569 = r16720567 - r16720568;
        return r16720569;
}

double f(double x, double y, double z) {
        double r16720570 = x;
        double r16720571 = y;
        double r16720572 = 0.5;
        double r16720573 = r16720571 + r16720572;
        double r16720574 = log(r16720571);
        double r16720575 = r16720573 * r16720574;
        double r16720576 = r16720575 - r16720571;
        double r16720577 = r16720570 - r16720576;
        double r16720578 = z;
        double r16720579 = r16720577 - r16720578;
        return r16720579;
}

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 2019174 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:stirlingError from math-functions-0.1.5.2"

  :herbie-target
  (- (- (+ y x) z) (* (+ y 0.5) (log y)))

  (- (+ (- x (* (+ y 0.5) (log y))) y) z))