Average Error: 0.1 → 0.1
Time: 6.6s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[x - \left(\left(\left(y + 0.5\right) \cdot \log y - y\right) + z\right)\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
x - \left(\left(\left(y + 0.5\right) \cdot \log y - y\right) + z\right)
double f(double x, double y, double z) {
        double r408554 = x;
        double r408555 = y;
        double r408556 = 0.5;
        double r408557 = r408555 + r408556;
        double r408558 = log(r408555);
        double r408559 = r408557 * r408558;
        double r408560 = r408554 - r408559;
        double r408561 = r408560 + r408555;
        double r408562 = z;
        double r408563 = r408561 - r408562;
        return r408563;
}

double f(double x, double y, double z) {
        double r408564 = x;
        double r408565 = y;
        double r408566 = 0.5;
        double r408567 = r408565 + r408566;
        double r408568 = log(r408565);
        double r408569 = r408567 * r408568;
        double r408570 = r408569 - r408565;
        double r408571 = z;
        double r408572 = r408570 + r408571;
        double r408573 = r408564 - r408572;
        return r408573;
}

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. Applied associate--l-0.1

    \[\leadsto \color{blue}{x - \left(\left(\left(y + 0.5\right) \cdot \log y - y\right) + z\right)}\]
  5. Final simplification0.1

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

Reproduce

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