\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
x - \left(\left(z + \left(y + 0.5\right) \cdot \log y\right) - y\right)
double f(double x, double y, double z) {
double r372226 = x;
double r372227 = y;
double r372228 = 0.5;
double r372229 = r372227 + r372228;
double r372230 = log(r372227);
double r372231 = r372229 * r372230;
double r372232 = r372226 - r372231;
double r372233 = r372232 + r372227;
double r372234 = z;
double r372235 = r372233 - r372234;
return r372235;
}
double f(double x, double y, double z) {
double r372236 = x;
double r372237 = z;
double r372238 = y;
double r372239 = 0.5;
double r372240 = r372238 + r372239;
double r372241 = log(r372238);
double r372242 = r372240 * r372241;
double r372243 = r372237 + r372242;
double r372244 = r372243 - r372238;
double r372245 = r372236 - r372244;
return r372245;
}




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-sqr-sqrt0.3
Applied associate-*l*0.3
rmApplied associate-+l-0.3
Applied associate--l-0.3
Simplified0.1
Final simplification0.1
herbie shell --seed 2020036
(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))