\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 r264336 = x;
double r264337 = y;
double r264338 = 0.5;
double r264339 = r264337 + r264338;
double r264340 = log(r264337);
double r264341 = r264339 * r264340;
double r264342 = r264336 - r264341;
double r264343 = r264342 + r264337;
double r264344 = z;
double r264345 = r264343 - r264344;
return r264345;
}
double f(double x, double y, double z) {
double r264346 = x;
double r264347 = y;
double r264348 = 0.5;
double r264349 = r264347 + r264348;
double r264350 = log(r264347);
double r264351 = r264349 * r264350;
double r264352 = r264346 - r264351;
double r264353 = r264352 + r264347;
double r264354 = z;
double r264355 = r264353 - r264354;
return r264355;
}




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 add-cube-cbrt0.1
Applied log-prod0.2
Applied distribute-lft-in0.2
Simplified0.2
Simplified0.2
rmApplied distribute-rgt-out0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2019199 +o rules:numerics
(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))