\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 r317399 = x;
double r317400 = y;
double r317401 = 0.5;
double r317402 = r317400 + r317401;
double r317403 = log(r317400);
double r317404 = r317402 * r317403;
double r317405 = r317399 - r317404;
double r317406 = r317405 + r317400;
double r317407 = z;
double r317408 = r317406 - r317407;
return r317408;
}
double f(double x, double y, double z) {
double r317409 = x;
double r317410 = y;
double r317411 = 0.5;
double r317412 = r317410 + r317411;
double r317413 = log(r317410);
double r317414 = r317412 * r317413;
double r317415 = r317414 - r317410;
double r317416 = z;
double r317417 = r317415 + r317416;
double r317418 = r317409 - r317417;
return r317418;
}




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 2019322
(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))