\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;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 0.1
rmApplied associate-+l-0.1
Applied associate--l-0.1
Final simplification0.1
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))